i18n
Only for the multi-language templates: how locales and the default language are wired.
When this applies
This page only applies if you chose multi-language support at install time (the templates-i18n copy). Plain templates have no locale routing. Template overview: templates.
Next.js (next-intl)
Config lives in src/i18n/routing.ts. The scaffold ships with en and tr.
locales/defaultLocale: which languages exist and which one is the fallback (enby default).- Copy lives in
src/messages/en.jsonandsrc/messages/tr.json(loaded viasrc/i18n/request.ts). localePrefix: "as-needed": the default locale has no URL prefix (/); others use/tr/…. Only the URL decides the language, with no automatic redirect.
For APIs and patterns beyond this scaffold, see the next-intl docs.
TanStack Start (Paraglide)
Locales are defined in project.inlang/settings.json. Routing uses the optional {-$lang} segment under src/routes/.
baseLocale: the default language (enby default).locales: all locales.- Messages live under
src/messages/{locale}.json(for examplesrc/messages/en.json). - The default locale has no URL prefix (
/); others use/tr/…, set byurlPatternsinvite.config.ts. Only the URL decides the language, with no automatic redirect.
For Paraglide details, see the Paraglide JS docs.
Change the default language
If you want to make another language the default:
- Next.js: set
defaultLocaleinsrc/i18n/routing.ts(for example"tr"). Withas-needed, the new default loses its URL prefix. - TanStack Start: set
baseLocaleinproject.inlang/settings.json, then swap the prefixed and unprefixed locales inurlPatternsinvite.config.ts. - Update product copy in the matching message files. Keep
site.config/ SEO locale fields consistent if you expose them.
To add a new language, register it in the locale list, create its message file, and expose it in the language switcher. See the next-intl or Paraglide docs for details.