-
Notifications
You must be signed in to change notification settings - Fork 109
Region Override Support #370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@FrankYFTang Is this an ICU issue or a spec issue? Do we need to modify ECMA-402 to allow the |
We'd need to change the spec to respect this, as the spec includes the schema for locale data, and all supported extension keys are explicitly specified. Region override would need to be processed somehow by the spec to permit this. |
We discussed this in the 2020-06-11 ECMA-402 meeting and agreed to move forward. |
@sffc does this need to be covered under user preferences? I don't think so, perhaps it can be dealt with separately. Question is: PR or proposal? While the spec diff might be larger than many smaller proposals, I don't really think there's much design/decision-making to do here, just make the locale-handling respect this additional subtag, right? |
Currently in ECMA402, each Intl object only listen to a restricted set of U extension specified in "[[RelevantExtensionKeys]] internal slot" and all others are stripped out while constructing the object before any matching. https://tc39.es/ecma402/#sec-internal-slots https://tc39.es/ecma402/#sec-intl-collator-internal-slots https://tc39.es/ecma402/#sec-intl.datetimeformat-internal-slots The value of the [[RelevantExtensionKeys]] internal slot is « "ca", "hc", "nu" »." https://tc39.es/ecma402/#sec-Intl.DisplayNames-internal-slots The value of the [[RelevantExtensionKeys]] internal slot is « »." https://tc39.es/ecma402/#sec-Intl.ListFormat-internal-slots The value of the [[RelevantExtensionKeys]] internal slot is « »." https://tc39.es/ecma402/#sec-intl.numberformat-internal-slots The value of the [[RelevantExtensionKeys]] internal slot is « "nu" »." https://tc39.es/ecma402/#sec-intl.pluralrules-internal-slots The value of the [[RelevantExtensionKeys]] internal slot is « »." So at minimum ECMA402 need to be changed to put "rg" into the RelevantExtensionKeys for it to be considered in the spec if we like to support Region Override. |
Discussion with @FrankYFTang @ben-allen @sffc: in order to move forward with this, the implementation (ICU) needs to fully support the
This is partly tracked upstream in: https://unicode-org.atlassian.net/browse/CLDR-15265 |
Item impacted by rg is listed in https://github.com/unicode-org/cldr/blob/main/common/supplemental/rgScope.xml And we should analysis which Intl object should be impacted by the -u-rg- |
I think we should wait until Intl Locale Info lands, and then we should put together this proposal (which should be small to medium in size). ICU4X can make this easier to implement. ICU4C should already implement -u-rg for certain key resources like unit preferences. |
Do you plan to support Region Override through Unicode Locale Extension:
Unicode Locale extensions seem to be managed internally.
The hour cycle and region override extensions are inverted from the toString method.
So, I guess the internal implementation holds all Unicode Locale Extensions but the region override is not take into account to format number, date and so on.
According to the spec, the region is used as default for:
Java 10 supports region override as expected:
Related issues:
The text was updated successfully, but these errors were encountered: