i18n

Add or update translation keys across seven locale files and wire them into React components.

4|2|Updated Oct 26, 2025
One-click install
npx skills add https://github.com/nomos-guild/cgov --skill i18n-nomos-guild
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: i18n
Source: https://github.com/nomos-guild/cgov/tree/main/.claude/skills/i18n
Command: npx skills add https://github.com/nomos-guild/cgov --skill i18n-nomos-guild

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Add or update translation keys across all locale files and wire them into React components or pure utility functions. Use when localizing new features, adding translation keys, or fixing hardcoded English strings across locale files.

Core Features & Use Cases

  • Manage translation keys across en, de, fr, es, pt, ja, zh.
  • Wire translations into components via next-intl, with proper interpolation and namespaces.
  • Handle localization for new features, keys, and fix hardcoded strings.

Quick Start

Identify the new translation key in en.json and add corresponding entries in all locale files. Wire the key into a React component using useTranslations("namespace") and t("key") with proper namespace. Build and verify across locales.

Frequently Asked Questions about i18n

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

FAQPage Schema
How do I add translation keys across multiple locale files in React?

To add translation keys across multiple locale files in React, you define the new key in your base locale file and generate corresponding entries across all other supported locales. This process enforces synchronization so every language remains consistent when wired into your components.

What is the best way to replace hardcoded English strings with next-intl translations?

The best way to replace hardcoded English strings with next-intl translations is to extract the text into a translation key, add it to the locale files, and wire it into the React component using useTranslations. You must specify the correct namespace and use interpolation for dynamic values.

Can I keep technical terms like DRep in English across all locales?

Yes, you can keep technical terms like DRep and SPO in English across all locales. The localization process allows you to maintain specific technical terms in English where appropriate, ensuring consistent domain terminology while translating the surrounding application text.

Does this approach to React localization support seven different locales?

Yes, this React localization approach explicitly supports a seven-locale setup including en, de, fr, es, pt, ja, and zh. It enforces key synchronization across all seven locale files to ensure no language is missing translations during feature development.

How do I use namespaces and interpolation when wiring translations into React components?

To use namespaces and interpolation when wiring translations into React components, you call useTranslations with the specific namespace and then use the t function for the key. You pass dynamic values through interpolation to ensure the localized string adapts correctly based on user input.

What happens if translation keys are missing from some locale files?

If translation keys are missing from some locale files, the localization enforcement mechanism breaks synchronization. You must add corresponding entries in all locale files whenever a new key is introduced to ensure consistent rendering across all supported languages and prevent missing text.