Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Skip to main content

JS INTL APIs

Support for a subset of ECMA-402 INTL APIs has been added to the Hermes Engine bundled with React Native for Vega. For more information, see https://hermesengine.dev/docs/intl/. The INTL methods supported may differ for Vega than for other platforms, refer to details below for supported methods.

INTL API reference

The following APIs are provide as Vega specific implementations of the APIs provided in the Intl namespace as defined in the ECMA-402 standard.

Intl.DateTimeFormat

The Intl.DateTimeFormat object enables language-sensitive date and time formatting. For more detailed information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat.

Intl.DateTimeFormat.format

The format() method formats a date according to the locale and formatting options of the Intl.DateTimeFormat object. For more detailed information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format.

Intl.DateTimeFormat.formatRange

The formatRange() method formats a date range in the most concise way based on the locales and options provided when the Intl.DateTimeFormat object was instantiated. For more detailed information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/formatRange.

Intl.DateTimeFormat.formatRangeToParts

The formatRangeToParts() returns an array of locale-specific tokens representing each part of the formatted date range produced by the Intl.DateTimeFormat object. For more detailed information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/formatRangeToParts.

Intl.DateTimeFormat.formatToParts

The formatToParts() method allows locale-aware formatting of strings produced by the Intl.DateTimeFormat object. For more detailed information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/formatRangeToParts.

Intl.DateTimeFormat.resolvedOptions

The resolvedOptions() method returns a new object with properties reflecting the locale and date and time formatting options specified during the initialization of the Intl.DateTimeFormat object. For more detailed information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/resolvedOptions.

Intl.DateTimeFormat.supportedLocalesOf

The supportedLocalesOf() is a static method that returns an array containing the provided locales that are supported by date and time formatting without having to fall back to the runtime’s default locale. For more detailed information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/supportedLocalesOf.

Intl.RelativeTimeFormat

The RelativeTimeFormat object enables language-sensitive relative time formatting. For more detailed information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat. Intl.RelativeTimeFormat() returns a new Intl.RelativeTimeFormat object.

Intl.RelativeTimeFormat.format

The format() method returns a value and a unit formatted according to the locale and formatting options of the Intl.RelativeTimeFormat object. For more detailed information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format.

Intl.RelativeTimeFormat.formatToParts

The formatToParts() method returns an Array of objects representing the relative time format in parts that can be used for custom locale-aware formatting. For more detailed information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts.

Intl.RelativeTimeFormat.resolvedOptions

The resolvedOptions() method returns a new object with properties reflecting the locale and relative time formatting options specified during initialization of the Intl.RelativeTimeFormat object. For more detailed information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions.

Intl.RelativeTimeFormat.supportedLocalesOf

The supportedLocalesOf() static method returns an Array locales from the supplied array of input locales that are supported in relative time formatting without having to fall back to the runtime’s default locale. For more detailed information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/supportedLocalesOf.

Intl.NumberFormat

The Intl.NumberFormat object enables language-sensitive number formatting. For more detailed information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat. Intl.NumberFormat() Creates a new NumberFormat object.

Intl.NumberFormat.format

The format() method formats a number according to the locale and formatting options of the Intl.NumberFormat object. For more detailed information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/format.

Intl.NumberFormat.formatRange

The formatRange() method formats a range of numbers according to the locale and formatting options of the Intl.NumberFormat object. For more detailed information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/formatRange.

Intl.NumberFormat.formatRangeToParts

The formatRangeToParts() returns an Array of objects containing the locale-specific tokens from which it is possible to build custom strings while preserving the locale-specific parts. This enables locale-aware custom formatting ranges of number strings. For more detailed information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/formatRangeToParts.

Intl.NumberFormat.formatToParts

The formatToParts() method returns locale-aware formatting of strings produced by this Intl.NumberFormat object. For more detailed information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/formatToParts.

Intl.NumberFormat.resolvedOptions

The resolvedOptions() method returns a new object with properties reflecting the locale and number formatting options specified during initialization of the Intl.NumberFormat object. For more detailed information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/resolvedOptions.

Intl.NumberFormat.supportedLocalesOf

The supportedLocalesOf() static method returns an array containing the locales from the supplied list of locales that are supported in number formatting without having to fall back to the runtime’s default locale. For more detailed information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/supportedLocalesOf.

Intl.Locale

The Intl.Locale object is a standard built-in property of the Intl object that represents a Unicode locale identifier. 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 and extension tags. Language identifiers are the core of the locale, consisting of language, script, 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. For more information about the Intl.Locale object, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale in the MDN Web Docs. Intl.Locale() creates a new Locale object.

Intl.Locale.maximize()

The maximize() method of Intl.Locale instances gets the most likely values for the language, script, and region of this locale based on existing values. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/maximize.

Intl.Locale.minimize()

The minimize() method of Intl.Locale instances attempts to remove information about this locale that would be added by calling maximize(). For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/minimize.

Intl.Locale.toString()

The toString() method of Intl.Locale instances returns this Locale’s full locale identifier string. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/toString.

Intl.Locale.baseName

The baseName accessor property of Intl.Locale instances returns a substring of this locale’s string representation, containing core information about this locale, including the language, and the script and region if available. baseName returns the language ["-" script] ["-" region] *("-" variant) subsequence of the unicode_language_id grammar. It only includes information explicitly specified in the constructor, either through the locale identifier string or the options object. The set accessor of baseName is undefined. This property cannot be changed directly. For more infomation, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/baseName.

Intl.Locale.calendar

The calendar accessor property of Intl.Locale instances returns the calendar type for this locale. While most of the world uses the Gregorian calendar, there are several regional calendar eras used around the world. The calendar property’s value is set at construction time, either through the ca key of the locale identifier or through the calendar option of the Intl.Locale() constructor. The latter takes priority if they are both present; and if neither is present, the property has value undefined. For a list of supported calendar types, see Intl.Locale.prototype.getCalendars(). The set accessor of calendar is undefined. This property cannot be changed directly. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/calendar.

Intl.Locale.caseFirst

The caseFirst accessor property of Intl.Locale instances returns whether case is taken into account for this locale’s collation rules. A locale’s collation rules are used to determine how strings are ordered in that locale. Certain locales use a character’s case (UPPERCASE or lowercase) in the collation process. This additional rule can be expressed in a Intl.Locale object’s caseFirst property. There are three values that the caseFirst property can have - upper, lower and false. The caseFirst property’s value is set at construction time, either through the kf key of the locale identifier or through the caseFirst option of the Intl.Locale() constructor. The latter takes priority if they are both present; and if neither is present, the property has value undefined. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/caseFirst.

Intl.Locale.collation

The collation accessor property of Intl.Locale instances returns the collation type for this locale, which is used to order strings according to the locale’s rules. Collation is the process of ordering strings of characters. It is used whenever strings must be sorted and placed into a certain order, from search query results to ordering records in a database. While the idea of placing strings in order might seem trivial, the idea of order can vary from region to region and language to language. The collation property’s value is set at construction time, either through the co key of the locale identifier or through the collation option of the Intl.Locale() constructor. The latter takes priority if they are both present and if neither is present, the property has value undefined. For a list of supported collation types, see Intl.Locale.prototype.getCollations(). The set accessor of collation is undefined. This property cannot be changed directly. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/collation.

Intl.Locale.hourCycle

The hourCycle accessor property of Intl.Locale instances returns the hour cycle type for this locale. There are 2 main types of time keeping conventions (clocks) used around the world: the 12 hour clock and the 24 hour clock. The hourCycle property’s value is set at construction time, either through the hc key of the locale identifier or through the hourCycle option of the Intl.Locale() constructor. The latter takes priority if they are both present; and if neither is present, the property has value undefined. For a list of supported hour cycle types, see Intl.Locale.prototype.getHourCycles(). The set accessor of hourCycle is undefined. This property cannot be changed directly. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle.

Intl.Locale.language

The language accessor property of Intl.Locale instances returns the language associated with this locale. Language is one of the core attributes of a locale. The Unicode specification treats the language identifier of a locale as the language and the region together (to make a distinction between dialects and variations, e.g. British English vs. American English). The language property of a Intl.Locale returns strictly the locale’s language subtag. The language property’s value is set at construction time, either through the language subtag (first part) of the locale identifier or through the language option of the Intl.Locale() constructor. The latter takes priority if they are both present. The set accessor of language is undefined. This property cannot be changed directly. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/language.

Intl.Locale.numberingSystem

The numberingSystem accessor property of Intl.Locale instances returns the numeral system for this locale. A numeral system is a system for expressing numbers. The numberingSystem property’s value is set at construction time, either through the nu key of the locale identifier or through the numberingSystem option of the Intl.Locale() constructor. The latter takes priority if they are both present; and if neither is present, the property has value undefined. For a list of supported numbering system types, see Intl.Locale.prototype.getNumberingSystems(). For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/numberingSystem.

Intl.Locale.numeric

The numeric accessor property of Intl.Locale instances returns whether this locale has special collation handling for numeric characters. Like caseFirst, numeric represents a modification to the collation rules utilized by the locale. numeric is a boolean value, which means that it can be either true or false. If numeric is set to false, there will be no special handling of numeric values in strings. If numeric is set to true, then the locale will take numeric characters into account when collating strings. This special numeric handling means that sequences of decimal digits will be compared as numbers. For example, the string "A-21" will be considered less than "A-123". For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/numeric.

Intl.Locale.region

The region accessor property of Intl.Locale instances returns the region of the world (usually a country) associated with this locale. Region is one of the core attributes of a locale. It allows selection for differences between the same language in, say, different countries. For example, English is spoken in the United Kingdom and the United States of America, but there are differences in spelling and other language conventions between those two countries. Knowing the locale’s region helps JavaScript programmers make sure that the content from their sites and applications is correctly displayed when viewed from different areas of the world. The region property’s value is set at construction time, either through the region subtag (third part if script is present, second part otherwise) of the locale identifier or through the region option of the Intl.Locale() constructor. The latter takes priority if they are both present; and if neither is present, the property has value undefined. The set accessor of region is undefined. This property cannot be changed directly. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/region.

Intl.Locale.script

The script accessor property of Intl.Locale instances returns the script used for writing the particular language used in this locale Script, sometimes called writing system, is one of the core attributes of a locale. It indicates the set of symbols, or glyphs, that are used to write a particular language. For instance, the script associated with English is Latin, whereas the script typically associated with Korean is Hangul. In many cases, denoting a script is not strictly necessary, since the language (which is necessary) is only written in a single script. There are exceptions to this rule, however, and it is important to indicate the script when multiple scripts are applicable. The script property’s value is set at construction time, either through the script subtag (second part, if present) of the locale identifier or through the script option of the Intl.Locale() constructor. The latter takes priority if they are both present; and if neither is present, the property has value undefined. The set accessor of script is undefined. This property cannot be changed directly. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/script.

Intl.Collator example

The Intl.Collator object enables language-sensitive string comparison. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator.

Intl.DurationFormat example

The Intl.DurationFormat object enables language-sensitive duration formatting. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat.

I18nManager

Other internationalization and localization utilities for apps can be accessed via the I18nManager.

I18nManager example

I18NManager API
Last modified on December 10, 2025