Command Palette

Search for a command to run...

Назад к скиллам
скилл № 15538

backend-internationalization

Use when the user asks about backend i18n, translating API messages, locale negotiation (Accept-Language), ICU MessageFormat, pluralization, BCP 47 tags or…

БесплатноБез исполняемых скриптов
j4flmaoот j4flmao★ 47 звёзд на GitHub

Установить backend-internationalization в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Backend Internationalization

Purpose

Design i18n architecture with locale selection, translation workflow, and message formatting.

Agent Protocol

Trigger

Exact user phrases: "i18n", "internationalization", "localization", "l10n", "translation", "multi-language", "locale", "language support", "translation file", "gettext", "message format", "ICU message", "pluralization", "RTL support".

Input Context

Before activating, verify:

  • Initial languages to support and priority order
  • Translation workflow (in-house translators, vendor, Crowdin/Lokalise)
  • Content types needing translation (API messages, emails, push notifications, error messages)
  • Who provides translations (developers, product team, translation service)

Output Artifact

Internationalization architecture design as formatted text.

Response Format

# Locale configuration with fallback chains
# Translation file structure
// Message formatting code
// Locale detection and negotiation

No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output — why use many token when few do trick.

Completion Criteria

  • Locale selection with BCP 47 tags and fallback chains
  • Message storage with ICU MessageFormat and key naming convention
  • Translation workflow defined (extract → translate → import → validate)
  • API message delivery with Accept-Language parsing and Content-Language header
  • Server-side locale-aware formatting (date, number, currency, timezone)
  • RTL support with dir attribute and bidirectional text handling

Max Response Length

200 lines of configuration and code.

Decision Tree

Which Library?

What tech stack and i18n needs?
  ├── Node.js, need ICU support, flexible
  │   └── i18next (most popular, rich ecosystem)
  ├── React, need ICU, date/number formatting
  │   └── FormatJS / react-intl (ICU native, Intl API integration)
  ├── Python / Django
  │   └── Babel + gettext (PO files, Django integration)
  ├── Python, need ICU
  │   └── Babel with babel-icu extension
  ├── Go
  │   └── go-i18n (ICU-like, YAML/TOML/JSON)
  └── Java / Spring
      └── ResourceBundle + ICU4J (standard Java i18n)

How to Detect Locale?

Where does the user's locale come from?
  ├── Browser sends Accept-Language header
  │   └── Parse q-value, negotiate against supported list
  ├── User has saved preference in profile
  │   └── Use profile locale, ignore Accept-Language
  ├── Domain or subdomain (fr.example.com)
  │   └── Map domain to locale
  ├── GeoIP (approximate location)
  │   └── Use as default only — never override user preference
  └── Authenticated API → JWT contains locale claim
      └── Extract from token, fast-path locale resolution

Workflow

Step 1: Library Selection

Library Language Message Format Pluralization ICU Native Framework
i18next JS/TS JSON 6 forms Via plugin Universal
FormatJS JS/TS ICU Built-in Yes React
gettext Multi PO/MO 4 forms Limited Python/PHP
Fluent (Project Fluent) Multi FTL Unlimited Yes Mozilla
Babel Python PO 4 forms Via babel-icu Django

Choose based on: ICU support requirements, framework integration, pluralization rules complexity (some languages have 6+ plural forms), and runtime performance. i18next is most popular for Node.js, FormatJS for React, gettext for Python/Django, Fluent for Mozilla projects.

Step 2: Locale Selection and Detection

Use BCP 47 tags: en-US, vi-VN, zh-CN, de-DE, fr-FR, ja-JP, ar-SA. Define fallback chain per language: es-MX → es-ES → es → en-US. Store supported locales in configuration. Detect user locale from: Accept-Language header (q-value parsing), user profile preference (database), geolocation (CloudFront CloudFront-Viewer-Country header), domain/subdomain (fr.example.com). Never guess locale from IP alone — always respect user preference.

function negotiateLocale(acceptLanguage: string): string {
  const supported = ['en-US', 'vi-VN', 'zh-CN', 'es-MX', 'es-ES', 'fr-FR', 'de-DE', 'ja-JP', 'ar-SA'];
  const fallbacks: Record<string, string> = { 'es-MX': 'es-ES', 'es-ES': 'es', 'es': 'en-US' };
  const parsed = acceptLanguage.split(',')
    .map(s => { const [tag, q = 'q=1'] = s.trim().split(';'); return { tag: tag.trim(), q: parseFloat(q.split('=')[1] || '1') }; })
    .sort((a, b) => b.q - a.q);
  for (const { tag } of parsed) {
    if (supported.includes(tag)) return tag;
    const base = tag.split('-')[0];
    if (supported.includes(base)) return base;
    if (fallbacks[tag]) return fallbacks[tag];
  }
  return 'en-US';
}

Step 3: Message Storage and ICU MessageFormat

Use ICU MessageFormat for all user-facing strings — supports pluralization, gender, select, and number/date formatting. Organize translation files as JSON per locale

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • references/i18n-architecture.md
  • references/i18n-frontend.md
  • references/i18n-libraries.md
  • references/i18n-performance.md
  • references/i18n-testing.md
  • references/l10n-patterns.md
  • references/rtl-i18n.md
  • references/translation-workflow.md

FAQ

Что делает скилл backend-internationalization?

Use when the user asks about backend i18n, translating API messages, locale negotiation (Accept-Language), ICU MessageFormat, pluralization, BCP 47 tags or locale-aware dates and currency. Produces a server-side localization setup. Not for UI string handling (use frontend-internationalization).

Как установить скилл backend-internationalization?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл backend-internationalization запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить backend-internationalization с