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
Add _zero suffix lookup if count === 0 #1705
Conversation
Currently it's what the Intl plural resolves to... I don't know if we should introduce a special zero handling... What do you think @jamuhl? |
This approach is very common: |
For me ok...as it's a rather common use case. But I think the check should add |
I added Why you think that this is irrelevant for chinese? The goal of this change is to provide the ability to use more natural language: This is also actual for chinese. |
It's a guess that chinese as it has only one plural form does not have a thing like zero, one, other at all...but idk...I'm not capable of speaking any asian language but you're right...the check won't work anyway...as the suffix is other |
Also want to mention that this pr isn't introduce requirement to add |
needs to be documented somewhere |
Thank you for your contribution, it's included in v21.6.0 |
Localizing in a specific way 0 count is a very common case.
There was a related issue.
Also unicode documentation says: "implementations are encouraged to provide the ability to have special plural messages for 0 in particular, so that more natural language can be used" https://cldr.unicode.org/index/cldr-spec/plural-rules
Checklist
npm run test
Checklist (for documentation change)