L Skippednote Locale edge demo
Locale · 0001Cloudflare Pages Function

Regional preferences at the edge

Live at CMH
Detected country
US
Edge colo
CMH
Selected by
Cloudflare location
Preference
New default
01

Locale preference

Cloudflare detects the request country and supplies regional language and currency defaults. Region and language are saved in a secure cookie; currency follows the selected region.

Demo modeEmulate another visitor countryThis changes the country used by the Function without changing your IP address.
Detected defaultUnited States / English / USD
Region currencyDerived by the Function
USD
Use location default
02

Application contract

Resolved locale

United States / English / USD

region=US language=en currency=USD
City
Columbus
Timezone
America/New_York
Continent
NA
03

Resolution order

Default
A

Cloudflare location

Country metadata selects the first regional language and currency.

Priority
B

Saved preference

A valid cookie overrides location on every following request.

Action
C

Human override

Choosing a new region replaces the cookie and its derived currency.

View Function response
{
  "language": "en",
  "region": "US",
  "currency": "USD",
  "source": "Cloudflare location",
  "detected": {
    "language": "en",
    "region": "US",
    "currency": "USD"
  },
  "country": "US",
  "actualCountry": "US",
  "simulatedCountry": null,
  "isSimulated": false,
  "city": "Columbus",
  "colo": "CMH",
  "continent": "NA",
  "timezone": "America/New_York",
  "hasSavedPreference": false
}