plugins/react-expert/skills/react-i18n/SKILL.md
react-i18next for React 19 - useTranslation hook, TypeScript Selector API, namespaces, pluralization, lazy loading, Suspense integration. Use when implementing translations in React apps (not Next.js).
npx skillsauth add fusengine/agents react-i18nInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Before ANY implementation, use TeamCreate to spawn 3 agents:
After implementation, run fuse-ai-pilot:sniper for validation.
ALWAYS apply SOLID principles from solid-react skill.
→ See ../solid-react/SKILL.md for complete rules
Key Rules:
modules/[feature]/src/interfaces/| Hook | Purpose | Guide |
|------|---------|-------|
| useTranslation() | Access translations and i18n instance | references/i18next-basics.md |
| useTranslation(ns) | Load specific namespace | references/namespaces.md |
| useTranslation([ns]) | Load multiple namespaces | references/namespaces.md |
→ See references/i18next-basics.md for detailed usage
| Package | Purpose | Size |
|---------|---------|------|
| i18next | Core library | ~40KB |
| react-i18next | React bindings | ~12KB |
| i18next-http-backend | Lazy loading | ~5KB |
| i18next-browser-languagedetector | Auto-detection | ~8KB |
Type-safe translations with autocompletion.
→ See references/typescript-types.md
Organize translations by feature for code splitting.
→ See references/namespaces.md
Count-based rules with ICU MessageFormat support.
→ See references/pluralization.md
Variables, dates, numbers, and currency formatting.
→ See references/interpolation.md
Load translations on-demand per route.
→ See references/lazy-loading.md
Auto-detect from browser, URL, cookie, localStorage.
→ See references/language-detection.md
Suspense, useTransition, Concurrent Rendering.
→ See references/react-19-integration.md
JSX elements inside translations.
→ See references/trans-component.md
Mock i18n for unit tests.
→ See references/testing.md
Right-to-left languages (Arabic, Hebrew).
→ See references/rtl-support.md
Handle missing keys gracefully.
→ See references/fallback-strategies.md
| Template | Use Case |
|----------|----------|
| templates/basic-setup.md | Configuration with React 19 |
| templates/language-switcher.md | Dropdown component |
| templates/typed-translations.md | TypeScript Selector API |
| templates/form-validation-i18n.md | Translated form errors |
| templates/lazy-loading-routes.md | Per-route loading |
| templates/date-number-formatter.md | Intl formatting |
| templates/plural-interpolation.md | Count-based messages |
| templates/trans-component-examples.md | JSX in translations |
| templates/testing-i18n.md | Unit test setup |
src/
├── modules/cores/i18n/
│ ├── src/
│ │ ├── interfaces/
│ │ │ └── i18n.interface.ts
│ │ ├── services/
│ │ │ └── i18n.service.ts
│ │ ├── hooks/
│ │ │ └── useLanguage.ts
│ │ └── config/
│ │ └── i18n.config.ts
│ ├── components/
│ │ └── LanguageSwitcher.tsx
│ └── locales/
│ ├── en/
│ │ └── translation.json
│ └── fr/
│ └── translation.json
└── main.tsx
<Suspense> for loading statesfallbackLngt('key'){{var}}i18n.changeLanguage()testing
Copy self-audit and ban-lists — filler verbs/hype adjectives, slop placeholder names, fake-precise numbers, Title Case headlines, humor in error copy ('Oops!'), em-dash crutch, one copy register per page.
development
Logged-in web apps — dashboards, auth flows, settings, onboarding, data tables, command palettes, modals, toasts. Register `product`: density and glance-speed over marketing polish, no hero/CTA-tricks, every data surface covers empty/loading/error explicitly, tables and dataviz follow preattentive-processing rules.
development
Marketing sites, landing pages, campaign pages — register `brand` (design IS the product). Structure comes from the register's POV + a macrostructure pick, never from copying an inspiration site's section flow. Hero discipline, deviated section order, asymmetric grids, and a silhouette lookalike-test gate before ship.
development
Token-strategy core — OKLCH color rules, neutral tinting, accent-commitment levels, type scale, 8pt spacing grid, touch targets, and the canonical output format of design-system.md (the file the harness gates on). This is routing step 1 of design-method/SKILL.md — read it before design-web/design-webapp/design-ios/design-android, before picking or auditing a single color/type/spacing value.