Parses a BCP-47 locale tag into a Intl.Locale.
The language, script, region, and variant subtags are preserved and canonicalized. Unicode extension keys (e.g. -u-ca-gregory) are stripped.
-u-ca-gregory
Throws a RangeError if the input is malformed.
RangeError
Parses a BCP-47 locale tag into a Intl.Locale.
The language, script, region, and variant subtags are preserved and canonicalized. Unicode extension keys (e.g.
-u-ca-gregory) are stripped.Throws a
RangeErrorif the input is malformed.