i18n

Manage react-i18next keys, namespaces, and translations with pnpm i18n.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/kissMyApps-tlm/kissmychat --skill i18n-kissmyapps-tlm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: i18n
Source: https://github.com/kissMyApps-tlm/kissmychat/tree/main/.agents/skills/i18n
Command: npx skills add https://github.com/kissMyApps-tlm/kissmychat --skill i18n-kissmyapps-tlm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Internationalization in React projects can become error-prone and hard to maintain as teams add languages, keys, and translations across locales. This Skill provides a standardized approach to manage i18n keys, namespaces, and translation generation with react-i18next to ensure consistency and reduce manual overhead.

Core Features & Use Cases

  • Key Naming & Convention: Enforces flat dot-notation keys (e.g., feature.context.action) to keep translations predictable and scalable.
  • Namespace Workflow: Guides adding namespaces under src/locales/default and exporting them in src/locales/default/index.ts for incremental localization.
  • Translation Generation: Uses pnpm i18n to generate translations across languages (e.g., zh-CN, en-US) and provides dev-preview translations when needed.
  • Usage Patterns: Demonstrates practical usage in React components with useTranslation from react-i18next and multiple namespaces.

Quick Start

Add a new translation key to src/locales/default/{namespace}.ts and run pnpm i18n to refresh all language files.

Frequently Asked Questions about i18n

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

FAQPage Schema
How do I set up internationalization in a React app with react-i18next?

Internationalization with react-i18next involves organizing translation keys in src/locales/default using flat dot-notation (e.g., feature.context.action), maintaining language files in locales/zh-CN and locales/en-US, and running pnpm i18n to generate translations across all languages automatically.

What's the best way to organize translation keys for scaling?

Use flat dot-notation keys organized by namespace in src/locales/default, export them centrally in src/locales/default/index.ts, and add new namespaces incrementally. This structure keeps translations predictable and maintainable as your app grows.

How do I add new translation namespaces to my React project?

Create a new namespace file in src/locales/default/{namespace}.ts with your keys, export it in src/locales/default/index.ts, then run pnpm i18n to generate translations across all language files automatically.

Can I use react-i18next with multiple language files?

Yes, react-i18next supports multiple language files through namespaces. Organize keys under src/locales/default, maintain separate language directories (locales/zh-CN, locales/en-US), and use useTranslation hook with namespace parameters in React components.

When should I regenerate translations with pnpm i18n?

Run pnpm i18n after adding new keys to src/locales/default namespaces or modifying the namespace structure. This ensures all language files stay synchronized and new translations are generated across locales/zh-CN, locales/en-US, and other configured languages.