Internationalization

From BuilderIO/agent-native · View interactive version

Internationalization is an AI agent skill from the GitHub repository BuilderIO/agent-native. 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`.

How to use this skill

Skill file

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/:

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

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-user localization record, 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.

group's pages are part of Settings. Link to a page with

buildSettingsRoute(page, sub?), and localize the link's label.

agentChat.settingsShell.* keys, and an app's own rows, areas, and search

entries take already translated strings from the app catalog.

of embedding formatted values in translation strings.

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:

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.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.