i18n

Implement internationalization with locale-aware formatting, pluralization, and RTL support.

53|1|Updated Dec 18, 2025
One-click install
npx skills add https://github.com/cosmix/claude-code-setup --skill i18n
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: i18n
Source: https://github.com/cosmix/claude-code-setup/tree/main/skills/i18n
Command: npx skills add https://github.com/cosmix/claude-code-setup --skill i18n

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Internationalization and localization are essential but complex when building software for multiple locales. This Skill provides guidance on architecture patterns, translation formats, and locale-aware formatting to simplify multi-language support.

Core Features & Use Cases

  • Architecture patterns: Separate translatable content from code and support dynamic locale switching.
  • Translation formats: JSON, YAML, PO/POT, and ICU message formats with practical examples.
  • Localization practices: RTL handling, pluralization rules, date/number formatting, and locale fallbacks.
  • Use Case: Build an app that supports en-US and fr-FR with proper date, number, and currency formatting across locales.

Quick Start

Set up locale files under src/locales (e.g., en-US, fr-FR), wire a locale selector in your app, and load translations with i18next or react-intl.

Frequently Asked Questions about i18n

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

FAQPage Schema
How do I add multi-language support to my application?

Multi-language support requires separating translatable content from code, setting up locale files (JSON, YAML, or PO formats), and using libraries like i18next or react-intl to dynamically load and switch between locales. Store translations in src/locales organized by language code (e.g., en-US, fr-FR) and wire a locale selector to enable runtime switching.

What's the best way to handle date, number, and currency formatting across locales?

Locale-aware formatting uses ICU message formats and built-in locale data to automatically adjust output based on regional conventions. Libraries like i18next and react-intl handle pluralization rules, number separators, currency symbols, and date patterns without manual string manipulation for each locale.

How do I implement RTL (right-to-left) layout support for Arabic and Hebrew?

RTL support involves detecting the active locale and applying directional CSS or layout properties that reverse text flow and element alignment. Store RTL metadata alongside locale definitions and conditionally apply RTL classes or styling based on the selected language.

Can I use JSON and YAML for translation files, or should I use PO format?

JSON, YAML, and PO/POT formats all work for storing translations. JSON and YAML integrate easily with JavaScript tooling and are simpler for small projects; PO format is standard for gettext workflows and scales well with translator tools and version control.

What happens if a translation is missing for a locale?

Fallback chains automatically load translations from a default locale (typically English) when a specific translation is unavailable. This ensures your app remains functional even with incomplete translations and reduces blank content or errors.

Does this approach work with React, Vue, or vanilla JavaScript?

Yes. i18next and react-intl support multiple frameworks through dedicated integrations. For vanilla JavaScript, i18next provides a framework-agnostic core library that handles translation loading, locale switching, and formatting independently.