Intl.Locale
Widely available
The Intl.Locale
API parses Unicode locale identifiers, with language, region, and script codes, such as zh-Hans-CN
or en-GB
.
Compatibility
- Chrome 74 Released on 2019-04-23
- Chrome Android 74 Released on 2019-04-24
- Edge 79 Released on 2020-01-15
- Firefox 75 Released on 2020-04-07
- Firefox for Android 79 Released on 2020-07-28
- Safari 14 Released on 2020-09-16
- Safari on iOS 14 Released on 2020-09-16
MDN docs
- Intl.Locale
- Intl.Locale.Locale
- Intl.Locale.baseName
- Intl.Locale.calendar
- Intl.Locale.caseFirst
- Intl.Locale.collation
- Intl.Locale.hourCycle
- Intl.Locale.language
- Intl.Locale.maximize
- Intl.Locale.minimize
- Intl.Locale.numberingSystem
- Intl.Locale.numeric
- Intl.Locale.region
- Intl.Locale.script
- Intl.Locale.toString
Specifications
- ECMAScript Internationalization API Specification, from TC39 (Ecma International).
BCD data
- javascript.builtins.Intl.Locale
- javascript.builtins.Intl.Locale.Locale
- javascript.builtins.Intl.Locale.baseName
- javascript.builtins.Intl.Locale.calendar
- javascript.builtins.Intl.Locale.caseFirst
- javascript.builtins.Intl.Locale.collation
- javascript.builtins.Intl.Locale.hourCycle
- javascript.builtins.Intl.Locale.language
- javascript.builtins.Intl.Locale.maximize
- javascript.builtins.Intl.Locale.minimize
- javascript.builtins.Intl.Locale.numberingSystem
- javascript.builtins.Intl.Locale.numeric
- javascript.builtins.Intl.Locale.region
- javascript.builtins.Intl.Locale.script
- javascript.builtins.Intl.Locale.toString