Readonly
CollatorReadonly
DateReadonly
DisplayReadonly
ListReadonly
LocaleReadonly
NumberReadonly
PluralReadonly
RelativeOptional
aInstancePtr: objectA run time mechanism for interface discovery.
NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.
aInstancePtr must not be null.
[in] A requested interface IID
[out] A pointer to an interface pointer to receive the result.
Returns a list of locale names formatted for display.
Example: let locs = getLocaleDisplayNames(["pl"], ["sr-RU", "es-MX", "fr-CA"]); locs === ["Serbski (Rosja)", "HiszpaĆski (Meksyk)", "Francuski (Kanada)"]
Returns the assumed script directionality for known Firefox locales. This is somewhat crude, but should work until Bug 1750781 lands.
TODO (Bug 1750781) - Callers should use Intl.LocaleInfo once it is standardized (see Bug 1693576), rather than maintaining a hardcoded list of RTL locales.
Generated using TypeDoc
This is a set of APIs that are of general usefulness for user interface internationalization.
They're all in various stages of the standardization process through ECMA402, so they are exposed to privileged content only but are written in the way to allow for easy migration to standard Intl object once the appropriate stage of the ECMA402 is achieved.
The exact structure of the code is a little bit complex because of that:
This allows us to write the code once, stick to the spec language of the proposal, reuse our ICU bindings in Spidermonkey and use the code to inform us on refining the spec proposal for the given API itself.
This helper API allows attaching the new APIs on any regular object.
This API exposes the actual functionality and wraps around the MozIntlHelper lazily retrieving and setting the accessors. On top of that, the API also binds additional functionality like using current application locale by default, and fetching OS regional preferences for date time format.