polyfill
polyfill copied to clipboard
MessageFormatter should explicitly not support non-English locales
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)
Or better: it should support locales by borrowing from the rules we have in the Translation component.
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).