JavaScript Intl Object Reference
The Intl Object
The JavaScript Intl object is the namespace for the ECMAScript Internationalization API.
It provides language-sensitive functionality for formatting and comparing data.
| Object | Description |
|---|---|
| Intl.Collator | Enables language-sensitive string comparison for sorting and searching. |
| Intl.DisplayNames | Translates language, region, script, and currency display names consistently. |
| Intl.DurationFormat | Enables language-sensitive formatting of durations (available since March 2025 in modern browsers) |
| Intl.ListFormat | Formats lists of items using locale-appropriate conjunctions (e.g., "Jack, Rahul, and Bob" in English). |
| Intl.Locale | Represents a Unicode locale identifier, allowing for easier manipulation and access to locale components like language, script, or region. |
| Intl.NumberFormat | Formats numbers and currencies according to locale-specific conventions, including decimal separators, thousand separators, and currency symbols. |
| Intl.PluralRules | Determines the appropriate plural form for a given number and language, which is crucial for grammatically correct messages (e.g., "1 item" vs. "2 items"). |
| Intl.RelativeTimeFormat | Formats relative times (e.g., "yesterday", "in 3 months") in a language-sensitive manner. |
| Intl.Segmenter | Provides functionality for segmenting text into meaningful units such as words, sentences, or graphemes |
The supportedValuesOf() Method
The supportedValuesOf() method returns an array of values supported by the system:
- calendar
- collation
- currency
- numbering systems
- time zones
- unit
Supported Calendar Codes
| Calendar ID | Description | Example |
|---|---|---|
iso8601 |
The default calendar used by Temporal. This is the modern international civil calendar. | 2026-05-17[u-ca=iso8601] |
gregory |
The standard Gregorian calendar used in most countries today. | 2026-05-17[u-ca=gregory] |
buddhist |
Calendar used mainly in Thailand. The year numbering differs from Gregorian. | 2026-05-17[u-ca=buddhist] |
chinese |
A traditional lunisolar calendar used for festivals and cultural dates. | 2026-05-17[u-ca=chinese] |
coptic |
A calendar used by the Coptic Orthodox Church. | 2026-05-17[u-ca=coptic] |
dangi |
A traditional Korean lunisolar calendar. | 2026-05-17[u-ca=dangi] |
ethioaa |
An Ethiopic calendar era based on the "Year of the World". | 2026-05-17[u-ca=ethioaa] |
ethiopic |
The Ethiopic calendar using the Amete Mihret era. | 2026-05-17[u-ca=ethiopic] |
hebrew |
A lunisolar calendar used in Jewish religious and civil contexts. | 2026-05-17[u-ca=hebrew] |
indian |
The Indian National Calendar, also called Saka calendar. | 2026-05-17[u-ca=indian] |
islamic |
A lunar calendar used in Islamic contexts. | 2026-05-17[u-ca=islamic] |
islamic-civil |
A tabular version of the Islamic calendar. | 2026-05-17[u-ca=islamic-civil] |
islamic-rgsa |
A Saudi Arabia variant of the Islamic calendar. | 2026-05-17[u-ca=islamic-rgsa] |
islamic-tbla |
A tabular arithmetic Islamic calendar. | 2026-05-17[u-ca=islamic-tbla] |
islamic-umalqura |
A calendar used officially in Saudi Arabia. | 2026-05-17[u-ca=islamic-umalqura] |
japanese |
The Japanese imperial era calendar. | 2026-05-17[u-ca=japanese] |
persian |
The Solar Hijri calendar used in Iran and Afghanistan. | 2026-05-17[u-ca=persian] |
roc |
The Minguo calendar used in Taiwan. | 2026-05-17[u-ca=roc] |
Supported Currency Values
The table below shows common currency codes used with the JavaScript Intl API.
Currency values are based on the ISO 4217 standard and are used with Intl.NumberFormat.
| Currency Code | Name | Symbol | Region | Example |
|---|---|---|---|---|
USD |
US Dollar | $ | United States | new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(100) |
EUR |
Euro | € | European Union | new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(100) |
GBP |
British Pound | £ | United Kingdom | new Intl.NumberFormat("en-GB",{style:"currency",currency:"GBP"}).format(100) |
JPY |
Japanese Yen | ¥ | Japan | new Intl.NumberFormat("ja-JP",{style:"currency",currency:"JPY"}).format(100) |
CNY |
Chinese Yuan | ¥ | China | new Intl.NumberFormat("zh-CN",{style:"currency",currency:"CNY"}).format(100) |
INR |
Indian Rupee | ₹ | India | new Intl.NumberFormat("en-IN",{style:"currency",currency:"INR"}).format(100) |
AUD |
Australian Dollar | $ | Australia | new Intl.NumberFormat("en-AU",{style:"currency",currency:"AUD"}).format(100) |
CAD |
Canadian Dollar | $ | Canada | new Intl.NumberFormat("en-CA",{style:"currency",currency:"CAD"}).format(100) |
CHF |
Swiss Franc | CHF | Switzerland | new Intl.NumberFormat("de-CH",{style:"currency",currency:"CHF"}).format(100) |
SEK |
Swedish Krona | kr | Sweden | new Intl.NumberFormat("sv-SE",{style:"currency",currency:"SEK"}).format(100) |
NOK |
Norwegian Krone | kr | Norway | new Intl.NumberFormat("no-NO",{style:"currency",currency:"NOK"}).format(100) |
DKK |
Danish Krone | kr | Denmark | new Intl.NumberFormat("da-DK",{style:"currency",currency:"DKK"}).format(100) |