add-react-i18n

Configure isolated react-i18next instances for React component libraries.

1|Updated Feb 10, 2026
One-click install
npx skills add https://github.com/landim32/awesome-ai-skills --skill add-react-i18n-landim32
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-react-i18n
Source: https://github.com/landim32/awesome-ai-skills/tree/main/skills/add-react-i18n
Command: npx skills add https://github.com/landim32/awesome-ai-skills --skill add-react-i18n-landim32

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Real-world React library authors often struggle to add robust internationalization without leaking consumer app configurations. This skill provides an isolated i18n setup that lets a library ship translations and an isolated i18n instance, while allowing consumers to override texts and languages.

Core Features & Use Cases

  • Isolated i18n instance using react-i18next to avoid conflicts with consuming apps.
  • Per-library translation namespace, with easy provider integration and language switching.
  • Works with optional consumer-provided translations to extend or override defaults.
  • Synchronous initialization to ensure translations are available immediately in SSR and tests.

Quick Start

Install the library, wrap your app with LibProvider, and optionally provide language and translations to enable instant multilingual support.

Frequently Asked Questions about add-react-i18n

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add internationalization to a React component library without conflicting with the consumer app's i18n setup?

Use an isolated i18n instance with react-i18next to add internationalization without leaking consumer app configurations. This provides a library-scoped translation namespace and a configurable provider to avoid conflicts.

How do I set up react-i18next for an npm package to support SSR and testing?

Set up react-i18next for an npm package using synchronous initialization to ensure translations are available immediately in SSR and tests. This isolated i18n instance initializes instantly without async loading delays.

Can consumers override default translations in a React library that ships its own i18n provider?

Yes, consumers can override default translations by supplying an optional language and custom translations to the provider. This allows extending or replacing default texts while maintaining an isolated i18n instance.

What's the best way to scope translations to a specific React library instead of the global app namespace?

The best way to scope translations is using a per-library translation namespace with an isolated i18n provider. This prevents namespace collisions and keeps library translations separate from consuming app configurations.

Why does my React library's i18n provider leak configuration into the consuming application?

Configuration leaks when a library shares a global i18n instance with the consuming application. Using an isolated i18n instance with a library-scoped namespace prevents this leak and maintains clean separation.

Does add-react-i18n work with any React library published as an npm package?

Yes, add-react-i18n specifically targets React component libraries published as npm packages. It enables isolated i18n support with a configurable provider, consumer-supplied language, and optional translation overrides.