internationalization
できること
このスキルは、画面に表示されるテキストを、アプリの翻訳カタログで管理する方法を説明します。使用する言語、キーの命名、翻訳チェックの実行方法を扱います。複数の言語に対応するアプリで、テキストを追加・変更する開発者向けです。
使う場面
- ✓アプリの文字、ラベル、通知、空の状態の表示などを追加・変更するとき。
- ✓アプリが他の言語を有効にしていて、その翻訳カタログを更新する必要があるとき。
- ✓言語の選択画面に、アプリが実際には読み込めない言語が出ているとき。
スキルのリンク
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/internationalization/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“設定画面に新しいラベルを追加して、フランス語とドイツ語の翻訳も更新してもらえますか。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントはまず英語のカタログにテキストを追加します。その後、アプリに登録されている言語だけを更新します。キーとプレースホルダーは同じに保ち、翻訳チェックを実行します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Internationalization — opt-in translations
English (en-US) is the default source locale. Do not create or update
additional locale catalogs unless the app's agent-native.config.ts lists them
under translations.locales.
Rule
Visible framework/template UI copy belongs in the app's i18n catalog, not
inline in components. When you add or edit UI text, update the English source
catalog first, then update only the locale catalogs listed in
translations.locales, and run the i18n guard.
Catalogs
Templates use app/i18n/:
en-US.tsis the canonical source tree and fallback.- Other locale files keep the same non-plural keys and the same placeholders.
index.tsexports anAgentNativeI18nCatalogwith English bundled and non-English catalogs loaded by dynamic import.
Use BCP-47 filenames from the supported set: en-US, zh-CN, es-ES,
fr-FR, de-DE, ja-JP, ko-KR, pt-BR, hi-IN, ar-SA.
If an app only ships translations for a subset of that set, set
supportedLocales on the AgentNativeI18nCatalog to that subset. Without it,
<LanguagePicker /> lists every framework-supported locale regardless of
whether loadMessages can actually resolve it.
UI Pattern
- Wrap apps with
AppProviders i18n={{ catalog: i18nCatalog }}. - Read strings with
useT()and keep keys stable. - Apps expose a
/settingsroute without a sidebar item for it: Settings opens from the account menu in the sidebar footer and from ⌘, (Ctrl+, elsewhere). Core's Account › Preferences page already renders the Interface language row (with Timezone; both are the per-userlocalizationrecord, so a change applies in every app); don't add a second picker to an app's Settings page. Keep the header language icon only as a quick-access shortcut. - Don't add an "Agent settings" row to an app's settings page: the Agent
group's pages are part of Settings. Link to a page with
buildSettingsRoute(page, sub?), and localize the link's label. - Settings copy follows the same rules: page and group labels are core
agentChat.settingsShell.*keys, and an app's own rows, areas, and search entries take already translated strings from the app catalog. - Use
useFormatters()for dates, numbers, relative time, and lists instead of embedding formatted values in translation strings. - Do not translate stable identifiers: action names, route names, enum values, app-state keys, database values, protocol fields, env var names, or provider names.
Plurals And Placeholders
Plural strings use i18next/CLDR suffixes. Do not force every locale to copy English plural categories:
- English uses
_oneand_other. - Chinese and Japanese usually use
_other. - Arabic uses
_zero,_one,_two,_few,_many, and_other.
Keep interpolation placeholders identical across locales, such as
{{count}}, {{name}}, or ICU-style {count} arguments.
RTL
New UI should be RTL-safe. Prefer logical CSS utilities/properties such as
ms-*, me-*, ps-*, pe-*, start-*, end-*, text-start, and
text-end when direction matters. Avoid hardcoded left/right positioning for
new localized UI unless it is genuinely physical.
Verification
Run:
pnpm guard:i18n-catalogs
For broader changes, also run the affected template tests and pnpm typecheck.
Machine translation is only a starting point; high-visibility strings need
human review.
よくある質問
翻訳はデフォルトで有効ですか?
いいえ。他の言語を使うには、アプリの設定で有効にする必要があります。英語が既定です。
すべての言語ファイルを変更する必要がありますか?
いいえ。アプリが有効として挙げている言語だけです。英語のカタログは常に最初に更新されます。
コンポーネントの中に直接テキストを書いてもよいですか?
いいえ。画面に表示するテキストはコンポーネントの中ではなく、カタログに入れるべきだとスキルは述べています。
詳細
作者による元の説明
How to add or edit localized UI copy in agent-native apps. Use when adding, removing, or changing user-visible interface text, prompts, toasts, labels, empty states, or date/number/list formatting. Apps opt in to additional locales from `agent-native.config.ts`.
repo: BuilderIO/agent-native
人気
- GitHubのスター
- 7.6k
- ランキング
- #13165
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
design-exploration
7.6kUIの複数のデザインの方向性を並べて検討し、1つを選んでもらい、選んだデザインを磨き上げるようエージェントを支援します。
visual-edit
7.6k実行中のローカルのアプリをビジュアルエディターで開き、本物の画面をまとめて確認し編集できるようエージェントを支援します。
turn-into-app
7.6kワークフロー、スプレッドシート、プロジェクトを、画面にデータが入り、操作の裏でエージェントが働く、洗練されたビジュアルアプリに変えます。
visual-plan
7.6kプレーンテキストの計画を、図、ファイルのマップ、コードの断片、未解決の質問を含む、対話できるビジュアルな計画に変えます。
似ているスキル
angular-developer
280kエージェントがAngularのコードを作成し、プロジェクト構成についてアドバイスできるようにします。新しいプロジェクトの開始、コード部品の作成、パフォーマンスやアクセシビリティの改善に役立ちます。
frontend-a11y
280kエージェントが Web インターフェースを誰にとっても使いやすくするよう支援します。スクリーンリーダーやキーボード操作に対応し、サイトやアプリが適切に動作するようにします。
frontend-patterns
280kエージェントがフロントエンド開発の最新パターンを適用できるようにします。React と Next.js において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。