Locales
These docs exist in one language; en-GB serves the same pages, so the mechanics can be seen working. The default locale stays out of the URL, and every other locale is in it: /demos/locales and /en-GB/demos/locales.
On this page, <Link href="/overview"> renders /overview, and with locale="en-GB" it renders /en-GB/overview: the overview, in en-GB.
What the locale changes
This page is rendered for en, and the locale is a param, so this is a separate prerendered copy: what follows was formatted by Intl on the server, with nothing re-formatted on the client and no flash of the other format. The dates and the amount are Intl's own; the units are the page's decision, since Intl formats the unit it is given and never converts — it would spell a distance in kilometres for en-GB as readily as in kilometers for en.
| Date | September 24, 2026 |
|---|---|
| Short date | 9/24/2026 |
| Time | 3:30 PM |
| Temperature | 72 degrees Fahrenheit |
| Body weight | 154 pounds |
| Amount | $1,234.50 |
Remembered
Choosing a locale is a preference, so it is kept in the locale cookie. Detection never writes it: what the browser asks for is an indicator, acted on for one visit. Pick en-GB above, then open the site root — you will be redirected to /en-GB, by the proxy, which reads the cookie before Accept-Language. Pick en and the root serves English again. Nothing else on the site looks at the cookie: /demos/locales is English whoever opens it.
Inspector
- Address bar
- /en/-/-/demos/locales
- Rendered as
- /en/-/-/-/-/demos/locales
- Locale
- en
- Preferences
- {}
- Flags
- {}