Intl
getCanonicalLocalesExn
RESCRIPT
let getCanonicalLocalesExn: string => array<string>getCanonicalLocalesExn(locale) returns the canonical form of locale.
Throws RangeError when the locale string is malformed.
See Intl.getCanonicalLocales on MDN.
Examples
RESCRIPTIntl.getCanonicalLocalesExn("EN-US") == ["en-US"]
getCanonicalLocalesManyExn
RESCRIPT
let getCanonicalLocalesManyExn: array<string> => array<string>getCanonicalLocalesManyExn(locales) canonicalises every locale in locales.
Throws RangeError when any locale string is malformed.
See Intl.getCanonicalLocales on MDN.
Examples
RESCRIPTIntl.getCanonicalLocalesManyExn(["EN-US", "fr"]) == ["en-US", "fr"]
supportedValuesOfExn
RESCRIPT
let supportedValuesOfExn: string => array<string>supportedValuesOfExn(key) returns the list of values supported by the runtime for the feature identified by key.
Throws RangeError when key is unsupported.
See Intl.supportedValuesOf on MDN.
Examples
RESCRIPTIntl.supportedValuesOfExn("calendar")->Array.includes("gregory") == true