#What it does
The /i18n skill audits your codebase for internationalization readiness. It finds every hardcoded user-facing string, flags locale-dependent formatting (dates, numbers, currencies), and helps you extract everything into a proper i18n system. Whether you are starting from zero or tightening an existing setup, it catches what manual search misses.
#How to use
bash
/i18nRun at the project root for a full audit. Target specific directories to scope the work.
bash
/i18n src/components/#What it finds
- Hardcoded strings -- Text in JSX, template literals, and attribute values that should use translation keys
- String concatenation -- Dynamic strings built with
+or template literals that break translator context - Date/number formatting --
toLocaleDateString()calls missing locale parameters, rawtoFixed()for currency - Pluralization issues -- Naive
count === 1 ? "item" : "items"that breaks in languages with complex plural rules - RTL concerns -- CSS that assumes left-to-right layout (hardcoded
margin-left,text-align: left) - Image text -- Images containing baked-in text that cannot be translated
#Workflow
- Scan -- Walks every component and page for user-facing text
- Classify -- Separates translatable text from technical strings (CSS classes, API keys, enum values)
- Extract -- Generates translation key files in your preferred format (JSON, TypeScript, ICU message syntax)
- Refactor -- Replaces hardcoded strings with
t('key')calls using your i18n library (next-intl, react-i18next, or similar) - Validate -- Checks that all keys have values and no orphaned keys exist
#Example
bash
> /i18n src/app/
## i18n Audit: 156 hardcoded strings found
### By category
- UI labels: 72 strings
- Error messages: 34 strings
- Placeholder text: 23 strings
- Button text: 18 strings
- Accessibility labels: 9 strings
### Issues
- [HIGH] 12 concatenated strings that need ICU MessageFormat
Example: `"You have " + count + " items"` -> `t('cart.itemCount', { count })`
- [MEDIUM] 8 dates using `toLocaleDateString()` without explicit locale
- [LOW] 3 images with embedded English text
### Generated
- locales/en.json (156 keys)
- locales/keys.ts (type-safe key constants)