-
Notifications
You must be signed in to change notification settings - Fork 17
Normative: Add maximize/minimize methods #30
Conversation
These methods add and remove likely subtags. UTR 35 defines the relevant algorithms in exactly the way we'd need here, so this patch just references that specification. We'd probably want to iterate on the details of the normative reference when integrating into the main specification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the change. Looks good.
Nit: unicode.org now supports "https", so we should use it in the links. |
And the leftover description for the no longer present [[LikelySubtags]] slot in https://tc39.github.io/proposal-intl-locale/#sec-intl.locale-internal-slots should be removed. |
Recommended by Andre Bargull in #30 (comment)
Do we care about the cases where CLDR / UTR 35 canonicalization is different from IANA / RFC5646 canonicalization? For example CLDR canonicalizes |
@anba Is there a UTR 35 algorithm we can reference for canonicalization? |
No idea. |
@anba - I'm confused. If CLDR canonicalizes |
Recommended by Andre Bargull in #30 (comment)
We're keeping around data about things like what's the default calendar for a locale, and exposing it in Intl.DateTimeFormat.prototype.resolvedOptions(). I wonder if we should expose this in |
@zbraniecki IIUC CLDR doesn't use plain BCP 47 per RFC 5646, but instead defines Unicode Language Identifier which are based on BCP 47. Whereas ECMA-402 uses plain BCP 47 per RFC 5646, including the canonicalization defined in RFC5646 which takes only the data from the IANA language tag registry and no other sources. CLDR canonicalization seems to use the data from common/supplemental/supplementalMetadata.xml. Oh, and ICU's |
These methods add and remove likely subtags. UTR 35 defines the relevant
algorithms in exactly the way we'd need here, so this patch just references
that specification. We'd probably want to iterate on the details of the
normative reference when integrating into the main specification.