internationalization-i18n
Skill266 starsChanged 10 months agoApache-2.0View on GitHub
Implement internationalization (i18n) best practices for web and mobile applications to support multiple languages and locales.
In this repository264 other files it gives its agents.
- accessibility-a11ySkill
- alpine-jsSkill
- analytics-data-analysisSkill
- android-developmentSkill
- angular-developmentSkill
- angularSkill
- anime-jsSkill
- anthropic-claude-developmentSkill
- api-developmentSkill
- apollo-graphqlSkill
- aspnet-coreSkill
- astroSkill
- auth0-authenticationSkill
- autogen-developmentSkill
- automl-hyperparameter-optimizationSkill
- aws-developmentSkill
- azureSkill
- backend-developmentSkill
- bash-scriptingSkill
- beautifulsoup-parsingSkill
- bitbucket-workflowSkill
- blazorSkill
- blender-python-addonSkill
- blockchainSkill
- bootstrapSkill
- business-central-developmentSkill
- cheerio-parsingSkill
- chrome-extension-developmentSkill
- ci-cd-best-practicesSkill
- clean-architectureSkill
- clean-codeSkill
- clerk-authenticationSkill
- cloudflare-developmentSkill
- computer-vision-opencvSkill
- convexSkill
- cppSkill
- c-sharpSkill
- cssSkill
- cypressSkill
- data-analysis-jupyterSkill
- data-analystSkill
- data-jupyter-pythonSkill
- deep-learning-pythonSkill
- deep-learning-pytorchSkill
- deep-learningSkill
- deno-typescriptSkill
- design-systemsSkill
- devopsSkill
- django-pythonSkill
- django-rest-api-developmentSkill
- dockerSkill
- dotnetSkill
- drizzle-ormSkill
- drupal-developmentSkill
- elasticsearch-best-practicesSkill
- electron-developmentSkill
- elixirSkill
- embedded-stm32Skill
- esbuild-bundlerSkill
- ethereumSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
34 rules. About 0 are common, 32 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈32
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Write concise, technical TypeScript code with accurate examples
- Distinctive: line 13
Use functional and declarative programming patterns.
- Distinctive: line 14
Ensure all user-facing text is internationalized and supports localization
- Distinctive: line 15
Use descriptive variable names with auxiliary verbs (isLoading, hasError)
- Distinctive: line 21
Use i18next and react-i18next for web applications
- Distinctive: line 23
Use interpolation for dynamic values in translations
- Distinctive: line 43
Use @nuxtjs/i18n module for Vue applications
- Very specific: line 45
Use useI18n composable for translations
- Distinctive: line 51
Use expo-localization for React Native apps
- Distinctive: line 52
Use react-native-i18n or i18n-js for translations
- Distinctive: line 58
Ensure proper text scaling for accessibility
- Distinctive: line 60
Test on devices with different system languages
- Very specific: line 82
Use descriptive, hierarchical keys (e.g., auth.login.button, errors.network.timeout)
- Distinctive: line 83
Avoid embedding HTML in translations when possible
- Distinctive: line 84
Keep translations context-aware and meaningful
- Distinctive: line 85
Document translation context for translators
- Distinctive: line 90
Use Intl.DateTimeFormat for date formatting
- Distinctive: line 96
Use Intl.NumberFormat for number formatting
- Distinctive: line 102
Use Intl.Collator for locale-aware string comparison
- Distinctive: line 109
Use CSS logical properties (margin-inline-start, padding-inline-end)
- Distinctive: line 112
Test thoroughly with RTL languages (Arabic, Hebrew, etc.)
- Distinctive: line 126
Never hardcode user-facing strings
- Distinctive: line 128
Use ICU message format for complex translations
- Distinctive: line 133
Avoid text in images; use CSS/SVG text when possible
- Distinctive: line 135
Use icons with text labels, not icons alone
- Distinctive: line 136
Consider cultural differences in imagery and color
- Distinctive: line 139
Test with pseudolocalization during development
- Distinctive: line 140
Verify text doesn't overflow containers
- Distinctive: line 141
Test with actual translations before release
- Distinctive: line 142
Verify RTL layout with native speakers
- Distinctive: line 143
Test currency and date formats across locales
- Distinctive: line 148
Use Zustand or React Context for language state
- Distinctive: line 154
Use TanStack React Query for caching translated content
- Distinctive: line 165
Use Zod for runtime validation with localized error messages
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
// 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
useI18ncomposable 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.jsonTranslation 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
/* 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
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

