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 /en-GB/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-GB, 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 | 24 September 2026 |
|---|---|
| Short date | 24/09/2026 |
| Time | 15:30 |
| Temperature | 22 degrees Celsius |
| Body weight | 11 stone |
| Amount | US$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-GB/-/-/demos/locales
- Rendered as
- /en-GB/-/-/-/-/demos/locales
- Locale
- en-GB
- Preferences
- {}
- Flags
- {}