Skip to content
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

MessageFormatter should explicitly not support non-English locales #157

Open
stof opened this issue Oct 23, 2018 · 2 comments
Open

MessageFormatter should explicitly not support non-English locales #157

stof opened this issue Oct 23, 2018 · 2 comments

Comments

@stof
Copy link
Member

stof commented Oct 23, 2018

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)

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Oct 31, 2018

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

@stof
Copy link
Member Author

stof commented Oct 31, 2018

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants