Closed Bug 1613713 Opened 4 years ago Closed 4 years ago

Ship Intl.Locale


(Core :: JavaScript: Internationalization API, enhancement)

Not set



Tracking Status
firefox74 --- wontfix
firefox75 --- fixed


(Reporter: anba, Assigned: anba)


(Keywords: dev-doc-complete)


(6 files)

Implement canonical form and expose Intl.Locale.

Also reorder "caseFirst" to match the updated spec position.

Parts 3 and 5 will implement the missing canonicalisation steps for variant
and transform extension subtags.

Depends on D61869

Variant subtag canonicalisation is back, but with slightly different semantics
compared to IANA BCP 47 canonicalisation.

Depends on D61870

Unicode extension subtags are now canonicalised for all operations, so we no
longer need the UnicodeExtensionCanonicalForm enum.

Unicode extension types provided through option objects are also canonicalised
to ensure no uncanonicalised locales are exposed. This also avoids triggering
various assertions where we assume we only expose fully canonicalised locales.

Also see:

Depends on D61871

Canonicalises the tlang subtag of a transform extension per the usual rules
for canonicalising the base name parts of a locale identifier. In addition to
that, deprecated tvalue subtags are now also replaced with their preferred
replacements according to the alias data from CLDR.

Depends on D61872

Some tests needed to be updated to account for an Intl constructor whose
prototype doesn't have a resolvedOptions method.

Depends on D61873

Pushed by
Part 1: Update spec references. r=jwalden
Part 2: Update comments for UTS 35. r=jwalden
Part 3: Add variant subtag canonicalisation. r=jwalden
Part 4: Remove UnicodeExtensionCanonicalForm option. r=jwalden
Part 5: Canonicalise transform extension subtags. r=jwalden
Part 6: Enable Intl.Locale by default. r=jwalden
You need to log in before you can comment on or make changes to this bug.