archives

« Bugzilla Issues Index

#4365 — Exposing IsStructurallyValidLanguageTag and CanonicalizeLanguageTag in Intl api


Would it make sense to expose the following two abstract operations through the Intl API:

* IsStructurallyValidLanguageTag
* CanonicalizeLanguageTag

For example:

Intl.areStructurallyValid(tags); // returns boolean
Intl.canonicalize(tags); // returns an array of tags in canonical form

I have a need to access these two abstract operations in a spec I'm working on, but I have no means to access them directly in Gecko (and would prefer not to re-implement the the algorithms independently of what we already have in Gecko).

The spec I'm implementing (steps 4 and 5):
http://w3c.github.io/manifest/#lang-member




*** This bug has been marked as a duplicate of bug 697 ***