TanStack i18n
Manage locale routing for TanStack Start and TanStack Router. Implement redirects, URL prefixes, and persist adapters with any translation library.
TanStack i18n handles locale routing for TanStack Start and Router. Use it for URL segments, first-visit redirects, and persisting or inferring locale — then pair it with your own translation library for strings.
What it handles
- Locale segments in URLs — prefix always, hide for default, or custom paths per language
- First-visit redirects and optional detect mode (banner UX without redirect)
- Persist adapters (cookie, server function) and infer adapters (
Accept-Language) - TanStack Start server entry — pass, redirect, sync cookie, detect
- Router URL helpers and
createLocaleProvider/setLocalefor language switching
What it does not do
It does not ship message catalogs, t() helpers, or formatting. Bring your own translation library for strings.
Get started
Install and wire createLocaleRuntime.
Examples
Run and play with code setups in React, Solid, Start, and Router.
Guides
Configuration, adapters, Start, Router.
Integrations
Pair locale routing with use-intl and other message libraries.
Migration
Migrate routing state from next-intl and remix-i18next.
Reference
Subpath exports, peers, and behavior contract.
AI Integration
Consolidated plain-text endpoints and raw Markdown serving for coding agents.