Support proper i18n pluralization
See original GitHub issueWe should use __n
for numeric messages to support unlimited, language-specific messages.
More: https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Plurals - i18next documentation
How to find the correct plural suffix? ... You can use this small utility to get the correct plural suffixes. ... Or try...
Read more >Pluralization | Vue I18n
You don't need to explicitly give the number for pluralization. The number can be accessed within locale messages via pre-defined named ...
Read more >Let's Talk About Internationalization of Plurals - Nelio Software
Remember that i18n is a two-step process: (a) select the appropriate sentence and (b) replace all placeholders with the actual values. If a ......
Read more >Java internationalization (i18n) with proper plurals
No, I don't know ICU and gettext, I only read that they have better support for plural forms. I also wonder how they...
Read more >Rails Internationalization (I18n) API - Ruby on Rails Guides
The I18n gem provides a Pluralization backend that can be used to enable locale-specific rules. Include it to the Simple backend, then add...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@seanyesmunt please read/follow this thread
I will try to answer the questions raised by @kauffj:
other
in the ICU model)one
form and theother
form separately if the target language requires these 2 forms (this will need a try I think - never trust the docu of a tool) (the Transifex docu also doesn’t mention how thezero
form is supported and it would really be a mess if it is not, as you need “You don’t have a car.” instead of “You have 0 cars.”)I’m not a JS developer at all (I usually do Java backend stuff) but I’m sure this can be wrapped with a generic vararg function or fancy other stuff. Whether it is
__n(...)
or whatever might be a decision to make after reading through the docu of the lib - as depending on lib, there might be some more to discover, like e.g. nested replacements.