frontend-internationalization
Use when the user asks about frontend i18n, i18next, react-intl/FormatJS, vue-i18n, next-intl, ICU plurals, Intl formatting, locale switching, RTL layout or…
от j4flmao★ 47 звёзд на GitHub
Установить frontend-internationalization в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Frontend Internationalization (i18n)
Purpose
Deliver multi-locale frontends with proper locale detection, resource loading, ICU message formatting, pluralization, date/number formatting, and full RTL layout support. The right library is chosen per framework. Translation files are kept separate from application logic.
Agent Protocol
Trigger
Exact phrases: "i18n", "internationalization", "localization", "locale switching", "RTL", "i18next", "react-intl", "vue-i18n", "translation", "language selector", "formatjs", "pluralization", "bidirectional text", "locale detection".
Input Context
- Framework (React, Vue, Angular, Svelte, vanilla)
- Locales required (e.g., en, fr, ar, he)
- Existing i18n library or preference
- SSR vs client-only rendering
- Dynamic vs build-time locale loading
- RTL support needed
Output Artifact
Complete i18n setup: library config, resource structure, locale switching mechanism, RTL styles, and usage patterns.
Response Format
## Strategy
<library, locale-loading, RTL-approach>
## Setup
<config, resource-imports>
## Usage
<components, hooks, format-patterns>
## RTL
<layout-switch, css-logical-properties>
—
Compression footer: frontend-i18n/v1 | locales: <count> | lib: <selected> | rtl: <bool>
No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output — why use many token when few do trick.
Completion Criteria
- Locale resources loaded (dynamic or static) without affecting TTFB
- Locale switching works without full page reload
- ICU message format used for pluralization and interpolation
- Dates, numbers, currencies formatted per locale
- RTL layout switches correctly with CSS logical properties
- Language direction attribute updates on the
<html>element - Translation key fallback chain configured (locale → fallback locale)
- SSR locale detection sends correct language to client
Max Response Length
4096 tokens
i18n Architecture / Decision Trees
Library Selection Decision Tree
Framework?
|-- React -->
| SSR needed?
| |-- YES: next-i18next (Next.js) or react-i18next (any)
| |-- NO: react-i18next (full featured) or react-intl (ICU, smaller bundle)
|
|-- Vue -->
| |-- Vue 3: vue-i18n (official)
| |-- Nuxt: @nuxtjs/i18n
|
|-- Angular -->
| |-- @angular/localize (official, compile-time)
| |-- ngx-translate (runtime)
|
|-- Svelte -->
| |-- svelte-i18n or sveltekit-i18n
|
|-- Cross-framework / monorepo -->
|-- i18next (framework-agnostic adapter)
Locale Loading Decision Tree
Number of locales?
|-- 2-3 locales, small files (<50KB total) -->
| Bundle all translations? If yes: Include in main bundle (no loading delay)
| If no: Lazy load on locale switch
|
|-- 4-10 locales, moderate files -->
| Lazy-load per locale on demand. Split by namespace (common, auth, admin).
| Cache loaded resources in memory.
|
|-- 10+ locales -->
| Lazy-load per locale, per namespace. Only load active locale.
| Consider CDN-hosted translation files to reduce initial bundle.
|
|-- SSR application -->
Load locale server-side, serialize to client via inline script.
Hydrate client with server-loaded resources (no double fetch).
RTL Strategy Decision Tree
RTL support needed?
|-- YES -->
| CSS approach?
| |-- Use CSS logical properties (inline-start/end) throughout
| |-- Set dir="rtl" on <html> element on locale change
| |-- Verify: all margin-left/right, padding-left/right, text-align left/right are replaced
| |
| Testing?
| |-- Visual: toggle locale to RTL, check every page
| |-- Automated: screenshot tests with RTL locale
|
|-- NO -->
Ensure CSS logical properties are used anyway (future-proof).
Workflow
1. Library Selection
| Framework | Library | Notes |
|---|---|---|
| React | react-i18next (i18next) | Most mature, full feature set |
| React | react-intl (FormatJS) | ICU message syntax, smaller bundle |
| Vue 2/3 | vue-i18n | Official Vue i18n solution |
| Angular | @angular/localize | Built-in Angular i18n |
| Svelte | svelte-i18n | Lightweight, reactive |
| Vanilla | i18next | Framework-agnostic |
Prefer i18next for cross-framework projects or when full feature set is needed. Prefer FormatJS for React projects that need ICU message syntax and smaller bundle size.
2. Resource Structure
locales/
├── en/
│ ├── common.json
│ ├── auth.json
│ └── errors.json
├── fr/
│ ├── common.json
│ ├── auth.json
│ └── errors.json
└── ar/
├── common.json
├── auth.json
└── errors.json
Namespaced translation files. Lazy-load namespaces on demand. Each namespace is a flat JSON file with dot-separated keys.
3. Locale Detection & Persistence
// Priority: URL > localStorage > cookie > navigator.langua
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/i18n-build-optimization.md
- references/i18n-implementation.md
- references/i18n-libraries.md
- references/i18n-testing.md
- references/i18n-workflow.md
- references/rtl-support.md
FAQ
Что делает скилл frontend-internationalization?
Use when the user asks about frontend i18n, i18next, react-intl/FormatJS, vue-i18n, next-intl, ICU plurals, Intl formatting, locale switching, RTL layout or translation files. Produces locale routing, message catalogs and RTL-safe CSS. Not for server-side i18n (use backend-internationalization) or mobile apps (use mobile-localization).
Как установить скилл frontend-internationalization?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл frontend-internationalization запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…