icu4x
icu4x copied to clipboard
Locale of constructed object design
Split from #173
The design doc submitted in https://github.com/unicode-org/icu4x/pull/1237 does not appear to address one of the original questions from #173, which is what types of getters we should expose on formatters to describe what locale they represent.
CC @mihnita
I think that https://github.com/unicode-org/icu4x/issues/173 mixes 2 concerns:
- The getters for Requested / Valid / Actual locale
- The first comment in #173 (from Zibi) about Requested / Available / Last Fallback / Resolved Locales
The second one is the one addressed by the "Design doc: locale fallback and negotiation #1237"
The first one I remember being discussed in detail in a meeting. The various arguments are captured in an issue, or in some meeting notes. I will search it and will link to it, if I find it.
But the gist of my argument there was that I think that "requested" is OK and possible to implement, but "valid" and " " are basically impossible (at least impossible to give something useful).
To format something we often assemble pieces from a lot of places. Think "2-23 dollars" Mixes in numbering formatting symbols (separators, grouping rules), digit types, translation for "dollars", plural rules, currency range format pattern. And (if for example the requested locale was en-US) these might come from root, en, en-US, Latn (en -> likely subtags). For dates the first day of the week / week-end come from the country, not the full locale.
Something like actual or valid would return (maybe) a map with info for each piece. Which is (I would argue) both ugly and useless.
But this does not capture the comments other had. I will try to find the meeting notes.
Note that we need to answer this question for the purposes of ECMA-402 resolvedOptions.
Discuss in the ICU-TC call.
This is mostly the same as #3906