Internationalization i18n

From Mindrally/skills · View interactive version

Internationalization i18n is an AI agent skill from the GitHub repository Mindrally/skills. Implement internationalization (i18n) best practices for web and mobile applications to support multiple languages and locales.

How to use this skill

Skill file

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

Web Application i18n

React/Next.js Applications

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

React Native/Expo Applications

Mobile i18n Setup

Mobile-Specific Considerations

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

Locale-Aware Formatting

Date and Time

Numbers and Currency

Sorting and Comparison

RTL (Right-to-Left) Support

Layout Considerations

Implementation

/* Use logical properties */
.element {
  margin-inline-start: 1rem;
  padding-inline-end: 0.5rem;
}

Best Practices

Development Guidelines

Content Considerations

Testing Requirements

State Management for i18n

Storing User Preferences

Data Fetching

Error Handling

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.