Search.../

browserLocale

Gets the locale of the site visitor's browser.

Description

A locale, also known as an IETF language tag, is an abbreviated code that defines the language, country, and other aspects of the site visitor's browser, such as number format and date format.

Some common locales include:

  • "en-US": English, United States
  • "en-GB": English, British
  • "es-ES": Spanish, Spain
  • "de-DE": German, Germany
  • "ja-JP": Japanese, Japan
  • "fr-CH": French, Switzerland
  • "it-IT": Italian, Italy

Type:

stringRead Only

Was this helpful?

Get the locale of a visitor's browser

Copy Code
1import wixWindowFrontend from 'wix-window-frontend';
2
3// ...
4
5let browserLocale = wixWindowFrontend.browserLocale; // "en-US"