Adding a language
Every block is i18n-native. A new language is a folder of message files — no component changes.
Each block reads its copy through next-intl under a namespace named after the block, and ships messages/en/<block>.json. The scaffold’s i18n/request.ts merges every file in messages/<locale>/ by filename, so the namespace is the filename.
Languages the registry ships
Every block also ships messages/mn/<block>.json, its Mongolian copy, kept to the English keys and ICU arguments by an architecture test. Start an app in both with:
pnpm dlx @intelligo-dev/cli create my-app --locales mn,enThe first locale is the default. intelligo sync updates a shipped translation the way it updates English: a value you have not changed takes the new release’s text, and one you reworded is kept.
Add a locale
-
Add it to
i18n/routing.ts. The scaffold writes:export const routing = defineRouting({ locales: ["en"], defaultLocale: "en", // Locale prefix only appears in the URL when it isn't the default // locale (e.g. /dashboard, not /en/dashboard) — a single-locale // deployment needs nothing beyond this config and the shipped // English messages to work. localePrefix: "as-needed", });Add the locale to
locales, for example["en", "de"]. -
Copy
messages/en/tomessages/de/and translate the values. Keep the keys. You can translate a namespace at a time:i18n/request.tslays each locale over the default locale’s messages, so a file or keydedoes not have yet renders in English. -
Install the
language-switcherblock and put it in a shell slot:// lib/shell-config.tsx export const shellConfig: ShellConfig = { headerRight: LanguageSwitcher };
A missing file or key renders in the default locale; messages/en stays the reference, and intelligo sync --check lists what a locale has not translated.
Your own strings
Add keys for your own routes to the relevant namespace — navigation labels go in messages/<locale>/app-shell.json, chat starters in chat.json — or add a new namespace file for a page of your own.
Links
Blocks navigate through @/i18n/navigation, so links keep the active locale. Use the same helpers in your own pages instead of next/link.