polyfill icon indicating copy to clipboard operation
polyfill copied to clipboard

MessageFormatter should explicitly not support non-English locales

Open stof opened this issue 7 years ago • 2 comments

Currently, for plural rules, the MessageFormatter polyfills uses the English rules for all locales (it ignores the locale). To be consistent with what we do in symfony/intl (used by symfony/polyfill-intl-icu to implement NumberFormatter and DateFormatter), we should rather fail explicitly here (using the English rules for a different locale would not give the right result anyway)

stof avatar Oct 23 '18 15:10 stof

Or better: it should support locales by borrowing from the rules we have in the Translation component.

nicolas-grekas avatar Oct 31 '18 12:10 nicolas-grekas

Well, rules we have in the component map to positional elements in the Symfony convention. the ICU formatting uses named elements, and there is no direct mapping between the Symfony positions and the ICU names (well, there is one, but different for each locale).

stof avatar Oct 31 '18 13:10 stof