Intl.Locale info
Intl.Locale info exposes locale-specific metadata such as week settings and hour cycle preferences. It helps applications adapt to regional conventions more accurately.
Overview
Intl.Locale info exposes locale-specific metadata such as week settings and hour cycle preferences. It helps applications adapt to regional conventions more accurately.
Browser support
| Feature | Desktop | Mobile | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
| 130 | 130 | | 17 | 130 | 17 | |
| Built-in object | ||||||
| The getCollations() method of Intl.Locale instances returns a list of one or more collation types for this locale. | 130 | 130 | | 17 | 130 | 17 |
| The getHourCycles() method of Intl.Locale instances returns a list of one or more unique hour cycle identifiers for this locale. | 130 | 130 | | 17 | 130 | 17 |
| The getNumberingSystems() method of Intl.Locale instances returns a list of one or more unique numbering system identifiers for this locale. | 130 | 130 | | 17 | 130 | 17 |
| The getTextInfo() method of Intl.Locale instances returns the ordering of characters indicated by either ltr (left-to-right) or by rtl (right-to-left) for this locale. | 130 | 130 | | 17 | 130 | 17 |
| The getTimeZones() method of Intl.Locale instances returns a list of supported time zones for this locale. | 130 | 130 | | 17 | 130 | 17 |
| The getWeekInfo() method of Intl.Locale instances returns a weekInfo object with the properties firstDay, weekend and minimalDays for this locale. | 130 | 130 | | 17 | 130 | 17 |
- Previously available under a different name: calendars (99)
- Implemented as an accessor property.
- Previously available under a different name: calendars (99)
- Implemented as an accessor property.
- This feature was removed in a later browser version (preview)
- Previously available under a different name: calendars (15.4)
- Implemented as an accessor property.
- Previously available under a different name: calendars (99)
- Implemented as an accessor property.
- Previously available under a different name: calendars (15.4)
- Implemented as an accessor property.
- Previously available under a different name: collations (99)
- Implemented as an accessor property.
- Previously available under a different name: collations (99)
- Implemented as an accessor property.
- This feature was removed in a later browser version (preview)
- Previously available under a different name: collations (15.4)
- Implemented as an accessor property.
- Previously available under a different name: collations (99)
- Implemented as an accessor property.
- Previously available under a different name: collations (15.4)
- Implemented as an accessor property.
- Previously available under a different name: hourCycles (99)
- Implemented as an accessor property.
- Previously available under a different name: hourCycles (99)
- Implemented as an accessor property.
- This feature was removed in a later browser version (preview)
- Previously available under a different name: hourCycles (15.4)
- Implemented as an accessor property.
- Previously available under a different name: hourCycles (99)
- Implemented as an accessor property.
- Previously available under a different name: hourCycles (15.4)
- Implemented as an accessor property.
- Previously available under a different name: numberingSystems (99)
- Implemented as an accessor property.
- Previously available under a different name: numberingSystems (99)
- Implemented as an accessor property.
- This feature was removed in a later browser version (preview)
- Previously available under a different name: numberingSystems (15.4)
- Implemented as an accessor property.
- Previously available under a different name: numberingSystems (99)
- Implemented as an accessor property.
- Previously available under a different name: numberingSystems (15.4)
- Implemented as an accessor property.
- Previously available under a different name: textInfo (99)
- Implemented as an accessor property.
- Previously available under a different name: textInfo (99)
- Implemented as an accessor property.
- This feature was removed in a later browser version (preview)
- Previously available under a different name: textInfo (15.4)
- Implemented as an accessor property.
- Previously available under a different name: textInfo (99)
- Implemented as an accessor property.
- Previously available under a different name: textInfo (15.4)
- Implemented as an accessor property.
- Previously available under a different name: timeZones (99)
- Implemented as an accessor property.
- Previously available under a different name: timeZones (99)
- Implemented as an accessor property.
- This feature was removed in a later browser version (preview)
- Previously available under a different name: timeZones (15.4)
- Implemented as an accessor property.
- Previously available under a different name: timeZones (99)
- Implemented as an accessor property.
- Previously available under a different name: timeZones (15.4)
- Implemented as an accessor property.
- Previously available under a different name: weekInfo (99)
- Implemented as an accessor property.
- Previously available under a different name: weekInfo (99)
- Implemented as an accessor property.
- This feature was removed in a later browser version (preview)
- Previously available under a different name: weekInfo (15.4)
- Implemented as an accessor property.
- Previously available under a different name: weekInfo (99)
- Implemented as an accessor property.
- Previously available under a different name: weekInfo (15.4)
- Implemented as an accessor property.
Syntax
// Intl.Locale info example
// See MDN Web Docs for details Live demo
Inspect locale calendar info
Read weekInfo, hour cycle, and calendars from Intl.Locale when supported.
Compare multiple locales
Inspect locale data differences across English, Japanese, and Arabic locales.
Build a locale summary row
Create a compact UI summary object from Intl.Locale fields.
Use cases
Localized calendars
Adjust first-day-of-week behavior and related layout rules to match user expectations.
Regional time displays
Align hour-cycle decisions with locale-specific preferences instead of assuming one global rule.
Cautions
- Locale metadata supports presentation choices, but products still need explicit policy decisions for shared experiences.
- Do not overfit UI behavior to locale data if the underlying business rule should remain fixed.
Accessibility
- Locale-aware calendar and time interfaces are easier to understand for users relying on consistent regional conventions.
- Accurate locale handling reduces ambiguity in spoken and visual time information.
Related links
Powered by web-features