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/….
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 $lang segment under src/routes/.
sourceLanguageTag: source / default language (enby default).languageTags: all locales.- Messages live under
messages/{languageTag}.json(for examplemessages/en.json). - App routes use
/$lang: both locales are prefixed (/en/…and/tr/…)./redirects to/en(baseLocale). This is not Next-style as-needed.
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
sourceLanguageTaginproject.inlang/settings.json(and regenerate Paraglide sobaseLocaleupdates)./will redirect to that locale; URLs stay prefixed for every language (/tr/…,/en/…). - 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.
