internationalization-i18n
多言語対応(i18n)とローカライゼーションを実現し、メッセージ抽出や翻訳カタログ、複数形ルール、日時・数値の書式設定、RTL言語サポート、i18nextなどのi18nライブラリを活用して、グローバルなビジネス展開を支援するSkill。
📜 元の英語説明(参考)
Implement internationalization (i18n) and localization including message extraction, translation catalogs, pluralization rules, date/time/number formatting, RTL language support, and i18n libraries like i18next and gettext. Use for multi-language, translation, or localization needs.
🇯🇵 日本人クリエイター向け解説
多言語対応(i18n)とローカライゼーションを実現し、メッセージ抽出や翻訳カタログ、複数形ルール、日時・数値の書式設定、RTL言語サポート、i18nextなどのi18nライブラリを活用して、グローバルなビジネス展開を支援するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o internationalization-i18n.zip https://jpskill.com/download/21453.zip && unzip -o internationalization-i18n.zip && rm internationalization-i18n.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/21453.zip -OutFile "$d\internationalization-i18n.zip"; Expand-Archive "$d\internationalization-i18n.zip" -DestinationPath $d -Force; ri "$d\internationalization-i18n.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
internationalization-i18n.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
internationalization-i18nフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 11
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
国際化 (i18n) とローカライゼーション
目次
概要
アプリケーションに国際化とローカライゼーションを実装するための包括的なガイドです。メッセージの翻訳、複数形処理、日付/時刻/数値の書式設定、RTL言語、および一般的なi18nライブラリとの統合について説明しています。
使用する場面
- 多言語アプリケーションを構築する場合
- 国際的なユーザーをサポートする場合
- 言語切り替えを実装する場合
- 異なるロケールに合わせて日付、時刻、数値を書式設定する場合
- RTL (右から左) 言語をサポートする場合
- 翻訳文字列を抽出し、管理する場合
- 複数形ルールを実装する場合
- 翻訳ワークフローをセットアップする場合
クイックスタート
最小限の動作例:
// i18n.ts
import i18next from "i18next";
import Backend from "i18next-http-backend";
import LanguageDetector from "i18next-browser-languagedetector";
await i18next
.use(Backend)
.use(LanguageDetector)
.init({
fallbackLng: "en",
debug: process.env.NODE_ENV === "development",
interpolation: {
escapeValue: false, // React already escapes
},
backend: {
loadPath: "/locales/{{lng}}/{{ns}}.json",
},
detection: {
order: ["querystring", "cookie", "localStorage", "navigator"],
caches: ["localStorage", "cookie"],
},
});
// ... (完全な実装についてはリファレンスガイドを参照してください)
リファレンスガイド
references/ ディレクトリにある詳細な実装:
| ガイド | 内容 |
|---|---|
| i18next (JavaScript/TypeScript) | i18next (JavaScript/TypeScript) |
| React-Intl (Format.js) | React-Intl (Format.js) |
| Python i18n (gettext) | Python i18n (gettext) |
| 日付と時刻の書式設定 | 日付と時刻の書式設定 |
| 数値と通貨の書式設定 | 数値と通貨の書式設定 |
| 複数形ルール | 複数形ルール |
| RTL (右から左) 言語のサポート | RTL (右から左) 言語のサポート |
| 翻訳管理 | 翻訳管理 |
| ロケール検出 | ロケール検出 |
| サーバーサイドi18n | サーバーサイドi18n |
ベストプラクティス
✅ するべきこと
- すべてのユーザー向け文字列を翻訳ファイルに抽出する
- 複雑なメッセージにはICUメッセージ形式を使用する
- 各言語で複数形を正しくサポートする
- ロケールを考慮した日付/時刻/数値の書式設定を使用する
- アラビア語、ヘブライ語などのRTLサポートを実装する
- フォールバック言語(通常は英語)を提供する
- 名前空間を使用して翻訳を整理する
- 擬似ローカライゼーション (ääçćëńţś) でテストする
- ロケールの設定を保存する (cookie, localStorage)
- 本番環境ではプロの翻訳者を使用する
- 翻訳管理ワークフローを実装する
- 動的なロケール切り替えをサポートする
- 翻訳メモリツールを使用する
❌ するべきではないこと
- コード内にユーザー向け文字列をハードコードする
- 翻訳された文字列を連結する
- 英語の文法ルールがすべての言語に適用されると仮定する
- すべての言語に一般的な複数形 (one/many) を使用する
- テキストの拡張(ドイツ語は約30%長くなる)を忘れる
- 日付/時刻をロケール固有の形式で保存する
- 言語を表すためにフラグを使用する (フラグ ≠ 言語)
- 文脈なしに専門用語を翻訳する
- 翻訳キーとUI文字列を混在させる
- altテキスト、タイトル、プレースホルダーの翻訳を忘れる
- 左から右へのレイアウトを前提とする
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Internationalization (i18n) & Localization
Table of Contents
Overview
Comprehensive guide to implementing internationalization and localization in applications. Covers message translation, pluralization, date/time/number formatting, RTL languages, and integration with popular i18n libraries.
When to Use
- Building multi-language applications
- Supporting international users
- Implementing language switching
- Formatting dates, times, and numbers for different locales
- Supporting RTL (right-to-left) languages
- Extracting and managing translation strings
- Implementing pluralization rules
- Setting up translation workflows
Quick Start
Minimal working example:
// i18n.ts
import i18next from "i18next";
import Backend from "i18next-http-backend";
import LanguageDetector from "i18next-browser-languagedetector";
await i18next
.use(Backend)
.use(LanguageDetector)
.init({
fallbackLng: "en",
debug: process.env.NODE_ENV === "development",
interpolation: {
escapeValue: false, // React already escapes
},
backend: {
loadPath: "/locales/{{lng}}/{{ns}}.json",
},
detection: {
order: ["querystring", "cookie", "localStorage", "navigator"],
caches: ["localStorage", "cookie"],
},
});
// ... (see reference guides for full implementation)
Reference Guides
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| i18next (JavaScript/TypeScript) | i18next (JavaScript/TypeScript) |
| React-Intl (Format.js) | React-Intl (Format.js) |
| Python i18n (gettext) | Python i18n (gettext) |
| Date and Time Formatting | Date and Time Formatting |
| Number and Currency Formatting | Number and Currency Formatting |
| Pluralization Rules | Pluralization Rules |
| RTL (Right-to-Left) Language Support | RTL (Right-to-Left) Language Support |
| Translation Management | Translation Management |
| Locale Detection | Locale Detection |
| Server-Side i18n | Server-Side i18n |
Best Practices
✅ DO
- Extract all user-facing strings to translation files
- Use ICU message format for complex messages
- Support pluralization correctly for each language
- Use locale-aware date/time/number formatting
- Implement RTL support for Arabic, Hebrew, etc.
- Provide fallback language (usually English)
- Use namespaces to organize translations
- Test with pseudo-localization (ääçćëńţś)
- Store locale preference (cookie, localStorage)
- Use professional translators for production
- Implement translation management workflow
- Support dynamic locale switching
- Use translation memory tools
❌ DON'T
- Hardcode user-facing strings in code
- Concatenate translated strings
- Assume English grammar rules apply to all languages
- Use generic plural forms (one/many) for all languages
- Forget about text expansion (German is ~30% longer)
- Store dates/times in locale-specific formats
- Use flags to represent languages (flag ≠ language)
- Translate technical terms without context
- Mix translation keys with UI strings
- Forget to translate alt text, titles, placeholders
- Assume left-to-right layout
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (4,072 bytes)
- 📎 references/date-and-time-formatting.md (2,247 bytes)
- 📎 references/i18next-javascripttypescript.md (3,730 bytes)
- 📎 references/locale-detection.md (1,161 bytes)
- 📎 references/number-and-currency-formatting.md (1,540 bytes)
- 📎 references/pluralization-rules.md (1,634 bytes)
- 📎 references/python-i18n-gettext.md (1,750 bytes)
- 📎 references/react-intl-formatjs.md (1,350 bytes)
- 📎 references/rtl-right-to-left-language-support.md (1,644 bytes)
- 📎 references/server-side-i18n.md (746 bytes)
- 📎 references/translation-management.md (1,976 bytes)