Our volunteers haven't translated this article into עברית yet. Join us and help get the job done!
You can also read the article in English (US).

The Intl.Locale constructor is a standard built-in property of the Intl object that represents a Unicode locale identifier.

Syntax

new Intl.Locale([tag [, options]])

Parameters

tag
The Unicode locale identifier string.
options
An object that contains configuration for the Locale. Keys are Unicode locale tags, values are valid Unicode tag values.

Description

The Intl.Locale object was created to allow for easier manipulation of Unicode locales. Unicode represents locales with a string, called a locale identifier. The locale identifier consists of a language identifier andextension tags. Language identifiers are the core of the locale, consisting of languagescript, and region subtags. Additional information about the locale is stored in the optional extension tags. Extension tags hold information about locale aspects such as calendar type, clock type, and numbering system type.

Traditionally, the Intl API used strings to represent locales, just as Unicode does. This is a simple and lightweight solution that works well. Adding a Locale class, however, adds ease of parsing and manipulating the language, script, and region, as well as extension tags.

The Intl.Locale object has the following properties and methods:

Properties

Intl.Locale.prototype
The prototype object for the Locale constructor.

Specifications

Specification Status Comment
Intl.Locale proposal Stage 3

Browser compatibility

Update compatibility data on GitHub
DesktopMobileServer
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung InternetNode.js
LocaleChrome Full support 74Edge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android Full support 74Chrome Android Full support 74Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support Nonodejs No support No
prototypeChrome Full support 74Edge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android Full support 74Chrome Android Full support 74Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support Nonodejs No support No
maximizeChrome Full support 74Edge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android Full support 74Chrome Android Full support 74Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support Nonodejs No support No
minimizeChrome Full support 74Edge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android Full support 74Chrome Android Full support 74Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support Nonodejs No support No
toStringChrome Full support 74Edge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android Full support 74Chrome Android Full support 74Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support Nonodejs No support No
baseNameChrome Full support 74Edge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android Full support 74Chrome Android Full support 74Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support Nonodejs No support No
calendarChrome Full support 74Edge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android Full support 74Chrome Android Full support 74Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support Nonodejs No support No
collationChrome Full support 74Edge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android Full support 74Chrome Android Full support 74Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support Nonodejs No support No
hourCycleChrome Full support 74Edge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android Full support 74Chrome Android Full support 74Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support Nonodejs No support No
caseFirstChrome Full support 74Edge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android Full support 74Chrome Android Full support 74Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support Nonodejs No support No
numericChrome Full support 74Edge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android Full support 74Chrome Android Full support 74Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support Nonodejs No support No
numberingSystemChrome Full support 74Edge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android Full support 74Chrome Android Full support 74Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support Nonodejs No support No
languageChrome Full support 74Edge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android Full support 74Chrome Android Full support 74Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support Nonodejs No support No
scriptChrome Full support 74Edge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android Full support 74Chrome Android Full support 74Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support Nonodejs No support No
regionChrome Full support 74Edge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android Full support 74Chrome Android Full support 74Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support Nonodejs No support No

Legend

Full support  
Full support
No support  
No support

See also

Document Tags and Contributors

Last updated by: jahzielv,