Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2020.
The Intl.Locale() constructor creates Intl.Locale objects.
Note: Intl.Locale() can only be constructed with new. Attempting to call it without new throws a TypeError.
The Unicode locale identifier string. For the syntax of locale identifier strings, see the Intl main page. Note that the Intl.Locale constructor, unlike most other Intl constructors, does not accept an array of locales or undefined.
optionsAn object that contains configuration for the Locale. Option values here take priority over extension keys in the locale identifier. Possible properties are:
languageThe language. Any syntactically valid string following the unicode_language_subtag grammar (2–3 or 5–8 letters) is accepted, but the implementation only recognizes certain kinds.
scriptThe script. Any syntactically valid string following the unicode_script_subtag grammar (4 letters) is accepted, but the implementation only recognizes certain kinds.
regionThe region. Any syntactically valid string following the unicode_region_subtag grammar (either 2 letters or 3 digits) is accepted, but the implementation only recognizes certain kinds.
variantsThe variants. It should be a dash (-) separated list of unique variant tags, where each tag is any syntactically valid string following the unicode_variant_subtag grammar (either 5–8 alphanumerals or a digit followed by 3 alphanumerals), but the implementation only recognizes certain kinds.
calendarThe calendar. Any syntactically valid string following the type grammar (one or more segments of 3–8 alphanumerals, joined by hyphens) is accepted, but the implementation only recognizes certain kinds, which are listed in Intl.supportedValuesOf().
collationThe collation. Any syntactically valid string following the type grammar is accepted, but the implementation only recognizes certain kinds, which are listed in Intl.supportedValuesOf().
numberingSystemThe numbering system. Any syntactically valid string following the type grammar is accepted, but the implementation only recognizes certain kinds, which are listed in Intl.supportedValuesOf().
caseFirstThe case-first sort option. Possible values are "upper", "lower", or "false".
hourCycleThe hour cycle. Possible values are "h23", "h12", "h11", or the practically unused "h24", which are explained in Intl.Locale.prototype.getHourCycles
numericThe numeric sort option. A boolean.
At its very simplest, the Intl.Locale() constructor takes a locale identifier string as its argument:
The constructor also takes an optional configuration object argument, which can contain any of several extension types. For example, set the hourCycle property of the configuration object to your desired hour cycle type, and then pass it into the constructor:
| ECMAScript® 2027 Internationalization API Specification # sec-intl-locale-constructor |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Jul 22, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.