スキル一覧に戻る
vasilyu1983

software-localisation

by vasilyu1983

25🍴 6📅 2026年1月23日
GitHubで見るManusで実行

SKILL.md


name: software-localisation description: Production-grade i18n/l10n patterns for React, Vue, Angular, and Node.js. Covers i18next, react-intl, vue-i18n, ICU message format, RTL support, TMS integration, and CI/CD translation workflows.

Software Localisation — Quick Reference

Production patterns for internationalisation (i18n) and localisation (l10n) in modern web applications. Covers library selection, translation management, ICU message format, RTL support, and CI/CD workflows.

Modern Best Practices (Jan 2026): react-i18next 15.x (2.1M weekly downloads), react-intl 7.x (FormatJS), vue-i18n 10.x (Vue 3 Composition API), @angular/localize 19.x, LinguiJS 5.x (smallest bundle), next-intl 3.x (Next.js App Router). ICU MessageFormat 2.0 finalized (tech preview in ICU 78), CLDR 48. AI-powered translation workflows emerging. TMS leaders: Phrase, Lokalise, Crowdin.

Authoritative References:


Quick Reference

TaskTool/LibraryCommandWhen to Use
React i18nreact-i18next 15.xnpm i i18next react-i18nextMost React apps, flexibility
React i18n (ICU)react-intl 7.xnpm i react-intlEnterprise, ICU/CLDR standards
Vue i18nvue-i18n 10.xnpm i vue-i18nVue 3 apps
Angular i18n@angular/localize 19.xng add @angular/localizeAngular apps
Next.js i18nnext-intl 3.xnpm i next-intlNext.js App Router
Minimal bundleLinguiJS 5.xnpm i @lingui/core @lingui/reactBundle size critical
Type-safetypesafe-i18n 5.xnpm i typesafe-i18nTypeScript-first projects
String extractioni18next-parsernpx i18next-parserExtract keys from code
ICU linting@formatjs/clinpx formatjs extractValidate ICU messages

When to Use This Skill

Use this skill when the user requests:

  • Setting up i18n/l10n in a React, Vue, Angular, or Next.js project
  • Choosing between i18n libraries (i18next vs react-intl vs LinguiJS)
  • Implementing pluralisation, interpolation, or ICU message format
  • Adding RTL (right-to-left) language support
  • Integrating with translation management systems (TMS)
  • Setting up CI/CD pipelines for translation workflows
  • Handling dates, numbers, currencies across locales
  • Lazy loading translations for performance
  • TypeScript integration with i18n

Decision Tree: Library Selection

Project requirements:
    │
    ├─ React/Next.js project?
    │   ├─ Enterprise, ICU/CLDR standards, TMS-first?
    │   │   └─ react-intl (FormatJS) — 17.8 kB, native ICU
    │   │
    │   ├─ Flexibility, plugins, lazy loading?
    │   │   └─ react-i18next — 22.2 kB, most popular
    │   │
    │   ├─ Bundle size critical (<15 kB)?
    │   │   └─ LinguiJS — 10.4 kB, ICU syntax
    │   │
    │   └─ TypeScript-first, compile-time safety?
    │       └─ typesafe-i18n — 2 kB runtime
    │
    ├─ Vue/Nuxt project?
    │   └─ vue-i18n — Native Vue integration, Composition API
    │
    ├─ Angular project?
    │   ├─ Built-in solution preferred?
    │   │   └─ @angular/localize — First-party, AOT support
    │   │
    │   └─ Need i18next ecosystem?
    │       └─ angular-i18next — Plugin wrapper
    │
    └─ Framework-agnostic / Node.js?
        └─ i18next core — Works everywhere

Library Comparison

LibraryBundle SizeICU SupportLazy LoadingTypeScriptBest For
react-i18next22.2 kBPluginNativeGoodMost React apps
react-intl17.8 kBNativeManualGoodEnterprise, ICU standards
LinguiJS10.4 kBNativeNativeExcellentBundle-conscious apps
typesafe-i18n2 kBNoManualExcellentTypeScript-first
vue-i18n~15 kBNativeNativeGoodVue 3 apps
@angular/localizeBuilt-inNativeAOTNativeAngular apps

Core Concepts

Translation Key Patterns

// Flat keys (simple)
"welcome": "Welcome to our app"
"user.greeting": "Hello, {name}"

// Nested keys (organised)
{
  "user": {
    "greeting": "Hello, {name}",
    "profile": {
      "title": "Your Profile"
    }
  }
}

// Namespace separation (scalable)
// common.json, auth.json, dashboard.json

ICU Message Format Essentials

// Simple interpolation
"Hello, {name}!"

// Pluralisation
"{count, plural, one {# item} other {# items}}"

// Select (gender, category)
"{gender, select, male {He} female {She} other {They}} liked your post"

// Number formatting
"Price: {price, number, currency}"

// Date formatting
"Posted: {date, date, medium}"

Locale Detection Strategy

Priority order:
1. User preference (stored in profile/localStorage)
2. URL parameter or path (/en/about, ?lang=de)
3. Cookie (NEXT_LOCALE, i18next)
4. Accept-Language header
5. Default locale fallback

Resources (Deep Dives)

Templates (Production Starters)

Data


Quick Setup Examples

React + i18next (5 minutes)

npm install i18next react-i18next i18next-http-backend i18next-browser-languagedetector
// src/i18n.ts
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import Backend from 'i18next-http-backend';
import LanguageDetector from 'i18next-browser-languagedetector';

i18n
  .use(Backend)
  .use(LanguageDetector)
  .use(initReactI18next)
  .init({
    fallbackLng: 'en',
    debug: process.env.NODE_ENV === 'development',
    ns: ['common', 'auth', 'dashboard'],
    defaultNS: 'common',
    interpolation: { escapeValue: false },
    backend: { loadPath: '/locales/{{lng}}/{{ns}}.json' }
  });

export default i18n;
// Usage in component
import { useTranslation } from 'react-i18next';

function Welcome() {
  const { t } = useTranslation();
  return <h1>{t('welcome')}</h1>;
}

Vue 3 + vue-i18n (5 minutes)

npm install vue-i18n
// src/i18n.ts
import { createI18n } from 'vue-i18n';

export const i18n = createI18n({
  legacy: false, // Composition API
  locale: 'en',
  fallbackLocale: 'en',
  messages: {
    en: { welcome: 'Welcome' },
    de: { welcome: 'Willkommen' }
  }
});
<script setup lang="ts">
import { useI18n } from 'vue-i18n';
const { t } = useI18n();
</script>

<template>
  <h1>{{ t('welcome') }}</h1>
</template>

Next.js App Router + next-intl (5 minutes)

npm install next-intl
// i18n/request.ts
import { getRequestConfig } from 'next-intl/server';

export default getRequestConfig(async ({ locale }) => ({
  messages: (await import(`../messages/${locale}.json`)).default
}));
// app/[locale]/page.tsx
import { useTranslations } from 'next-intl';

export default function Home() {
  const t = useTranslations('Home');
  return <h1>{t('welcome')}</h1>;
}

Common Patterns

Namespace Organisation

locales/
├── en/
│   ├── common.json      # Shared: buttons, errors, nav
│   ├── auth.json        # Login, register, password
│   ├── dashboard.json   # Dashboard-specific
│   └── validation.json  # Form validation messages
├── de/
│   └── ... (same structure)
└── ar/
    └── ... (same structure)

Lazy Loading (Performance)

// i18next: Load namespaces on demand
i18n.loadNamespaces('dashboard').then(() => {
  // Dashboard translations now available
});

// React Suspense integration
<Suspense fallback={<Loading />}>
  <Dashboard />
</Suspense>

TypeScript Integration

// resources.d.ts - Type-safe keys
import common from './locales/en/common.json';

declare module 'i18next' {
  interface CustomTypeOptions {
    defaultNS: 'common';
    resources: {
      common: typeof common;
    };
  }
}

// Now t('nonexistent') shows TypeScript error

Anti-Patterns to Avoid

Anti-PatternProblemFix
Hardcoded stringsNot translatableExtract all user-facing text
String concatenationBreaks translation contextUse interpolation {name}
Manual pluralisationWrong for many languagesUse ICU plural rules
Inline styles for RTLDoesn't scaleUse CSS logical properties
Storing locale in URL onlyLost on navigationAlso persist to cookie/storage
No fallback localeBlank text for missing keysAlways set fallbackLng
Loading all locales upfrontSlow initial loadLazy load per namespace/locale

Operational Checklist

Initial Setup

  • Choose i18n library based on decision tree
  • Set up directory structure for translations
  • Configure fallback locale chain
  • Set up locale detection strategy
  • Add TypeScript types for translation keys
  • Configure lazy loading for namespaces

Translation Workflow

  • Set up string extraction (i18next-parser, formatjs)
  • Integrate with TMS (Phrase, Lokalise, Crowdin)
  • Configure CI/CD for translation sync
  • Set up translation review process
  • Add missing key detection in development

RTL Support

  • Use CSS logical properties (margin-inline-start)
  • Add dir="rtl" to html/body for RTL locales
  • Test with actual RTL content (Arabic, Hebrew)
  • Handle bidirectional text (BiDi)
  • Mirror icons and images where appropriate

Testing

  • Test pluralisation with 0, 1, 2, 5, 21 (language-specific)
  • Test date/number formatting per locale
  • Test RTL layout in all components
  • Test missing translation key handling
  • Test locale switching without page reload

Trend Awareness Protocol

IMPORTANT: When users ask recommendation questions about i18n libraries, translation tools, or localisation practices, you MUST use WebSearch to check current trends before answering.

Trigger Conditions

  • "What's the best i18n library for [React/Vue/Angular]?"
  • "What should I use for [translation/localisation]?"
  • "What's the latest in i18n/l10n?"
  • "Current best practices for [i18next/react-intl]?"
  • "Is [library] still relevant in 2026?"
  • "[i18next] vs [react-intl] vs [LinguiJS]?"
  • "Best translation management system?"

Required Searches

  1. Search: "i18n best practices 2026"
  2. Search: "[specific library] vs alternatives 2026"
  3. Search: "localisation trends January 2026"
  4. Search: "translation management systems 2026"

What to Report

After searching, provide:

  • Current landscape: What i18n tools/libraries are popular NOW
  • Emerging trends: New libraries, patterns, or TMS platforms gaining traction
  • Deprecated/declining: Libraries/approaches losing relevance or support
  • Recommendation: Based on fresh data, not just static knowledge
  • i18n libraries (react-i18next, react-intl, LinguiJS, next-intl)
  • Translation management (Phrase, Lokalise, Crowdin)
  • ICU MessageFormat 2.0 adoption
  • AI-assisted translation and review
  • RTL support patterns and tools
  • TypeScript i18n integration

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です