internationalization-i18n · mindrally — Claude Code skill: i18n for web
This skill gives the agent a rulebook for internationalization: translations, locale-aware dates and numbers, RTL layout. Useful when an app ships in more than one language.
npx skills add Mindrally/skills --skill internationalization-i18n -a claude-codeWhat internationalization-i18n does
The skill turns the agent into an i18n guide for web and mobile apps. Every string a user can see has to go through translations instead of sitting inline in a component. For React and Next.js the agent reaches for i18next and react-i18next, organises translations by namespace, and wires up interpolation and pluralization. For Nuxt.js it uses the @nuxtjs/i18n module with localized routes. In React Native and Expo it leans on expo-localization and automatic device locale detection.
What you get is a set of rules, not finished code. The agent follows them while writing or editing your project: it splits translations into files like locales/en/common.json, suggests hierarchical keys such as auth.login.button, formats dates with Intl.DateTimeFormat, numbers and currency with Intl.NumberFormat, and sorting with Intl.Collator. For RTL it points to CSS logical properties (margin-inline-start, padding-inline-end) and mirrored layouts. Language state lives in Zustand or React Context, persisted to localStorage and AsyncStorage.
The catch is plain: the skill describes an approach, it does not install libraries for you. Packages like i18next, @nuxtjs/i18n or expo-localization still have to be added to the project, otherwise the agent has nothing to build on. Text expansion is baked into the guidance from the start — some languages need 30-50% more room, so fixed-width containers are worth checking before release.
What it helps with
- move every user-facing string into translation files
- set up i18next in a React or Next.js app with namespaces
- add pluralization and interpolation to translations
- format dates, numbers and currency per user locale
- build RTL layouts with CSS logical properties
Example prompts for the agent
- Set up i18n in this Next.js project with i18next and split translations by namespace
- Add pluralization for the item counter and format the price per locale
- Switch this React Native screen to RTL and check the layout holds up
How to install internationalization-i18n
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill internationalization-i18n -a claude-code2Manually: put the files in place
~/.claude/skills/internationalization-i18n/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/internationalization-i18n/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill internationalization-i18n -a codex2Manually: put the files in place
.agents/skills/internationalization-i18n/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill internationalization-i18n -a cursor2Manually: put the files in place
.cursor/skills/internationalization-i18n/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Mindrally/skills internationalization-i18n2Manually: put the files in place
.github/skills/internationalization-i18n/SKILL.md1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill internationalization-i18n -a gemini-cli2Platform CLI
gemini skills install https://github.com/Mindrally/skills --path internationalization-i18nManually: put the files in place
.devin/skills/internationalization-i18n/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Mindrally/skills --skill internationalization-i18n -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about internationalization-i18n
How do I install internationalization-i18n in Claude?
Run npx skills add Mindrally/skills --skill internationalization-i18n -a claude-code. The skill lands in ~/.claude/skills/internationalization-i18n/SKILL.md.
What does internationalization-i18n do?
It gives the agent i18n rules: translations via i18next or @nuxtjs/i18n, date and number formatting through Intl, RTL support, and language preference storage.
Do I need to add anything to my project first?
Yes. The skill covers the approach, while the translation and locale-detection libraries get installed in the project itself.
Source text
SKILL.md · Apache-2.0
---
name: internationalization-i18n
description: Implement internationalization (i18n) best practices for web and mobile applications to support multiple languages and locales.
metadata:
maintainer: Mindrally
source: https://github.com/Mindrally/skills
---
# Internationalization (i18n)
You are an expert in internationalization for web and mobile applications. Apply these guidelines to ensure applications can be easily adapted for different languages, regions, and cultures.
## Core Principles
- Write concise, technical TypeScript code with accurate examples
- Use functional and declarative programming patterns; avoid classes
- Ensure all user-facing text is internationalized and supports localization
- Use descriptive variable names with auxiliary verbs (isLoading, hasError)
- Design for text expansion (some languages require 30-50% more space)
## Web Application i18n
### React/Next.js Applications
- Use i18next and react-i18next for web applications
- Implement namespace-based translation organization
- Use interpolation for dynamic values in translations
- Leverage pluralization features for count-based text
- Implement context-based translations where needed
### Implementation Pattern
```typescript
// Use translation hooks
const { t } = useTranslation('common');
// Basic translation
<h1>{t('welcome.title')}</h1>
// With interpolation
<p>{t('greeting', { name: userName })}</p>
// With pluralization
<span>{t('items', { count: itemCount })}</span>
```
### Nuxt.js Applications
- Use @nuxtjs/i18n module for Vue applications
- Implement SEO best practices with localized routes
- Use `useI18n` composable for translations
- Leverage lazy loading for translation files
## React Native/Expo Applications
### Mobile i18n Setup
- Use expo-localization for React Native apps
- Use react-native-i18n or i18n-js for translations
- Detect device locale automatically
- Support fallback languages
### Mobile-Specific Considerations
- Support RTL (right-to-left) layouts
- Ensure proper text scaling for accessibility
- Handle device locale changes dynamically
- Test on devices with different system languages
## Translation File Organization
### File Structure
```
locales/
en/
common.json
auth.json
errors.json
es/
common.json
auth.json
errors.json
fr/
common.json
auth.json
errors.json
```
### Translation Keys Best Practices
- Use descriptive, hierarchical keys (e.g., `auth.login.button`, `errors.network.timeout`)
- Avoid embedding HTML in translations when possible
- Keep translations context-aware and meaningful
- Document translation context for translators
## Locale-Aware Formatting
### Date and Time
- Use Intl.DateTimeFormat for date formatting
- Respect user's locale preferences
- Store dates in UTC, display in local timezone
- Support multiple date format preferences
### Numbers and Currency
- Use Intl.NumberFormat for number formatting
- Display currency in user's preferred format
- Handle decimal and thousand separators by locale
- Support right-to-left number display where needed
### Sorting and Comparison
- Use Intl.Collator for locale-aware string comparison
- Implement locale-specific sorting rules
- Handle diacritics and special characters correctly
## RTL (Right-to-Left) Support
### Layout Considerations
- Use CSS logical properties (margin-inline-start, padding-inline-end)
- Implement bidirectional text support
- Mirror UI layouts for RTL languages
- Test thoroughly with RTL languages (Arabic, Hebrew, etc.)
### Implementation
```css
/* Use logical properties */
.element {
margin-inline-start: 1rem;
padding-inline-end: 0.5rem;
}
```
## Best Practices
### Development Guidelines
- Never hardcode user-facing strings
- Extract all text to translation files
- Use ICU message format for complex translations
- Implement fallback mechanisms for missing translations
- Support language switching without page reload
### Content Considerations
- Avoid text in images; use CSS/SVG text when possible
- Design flexible layouts that accommodate text expansion
- Use icons with text labels, not icons alone
- Consider cultural differences in imagery and color
### Testing Requirements
- Test with pseudolocalization during development
- Verify text doesn't overflow containers
- Test with actual translations before release
- Verify RTL layout with native speakers
- Test currency and date formats across locales
## State Management for i18n
### Storing User Preferences
- Use Zustand or React Context for language state
- Persist language preference (localStorage, AsyncStorage)
- Sync language preference with user account
- Handle server-side rendering with correct locale
### Data Fetching
- Use TanStack React Query for caching translated content
- Invalidate queries on language change when needed
- Fetch locale-specific content from APIs
- Handle translation loading states gracefully
## Error Handling
- Provide translated error messages
- Implement fallback to default language for missing translations
- Log missing translation keys in development
- Handle RTL/LTR text direction in error displays
- Use Zod for runtime validation with localized error messages
© Mindrally · Apache-2.0 · Mindrally/skills
Similar skills
Everything for Frontend and UI →internationalization-i18n by other authors comes first.