-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
Complicated plurals don't work for me #45
Comments
english has only singular and plural form -> so you don't need to suffix the keys for en. Only locales with more than one plural form (or zero) need to be suffixed. |
With this translation .json
The special case for 0 doesn't work. I was expecting:
Instead of:
|
i18next supports the plural like in given language and doesn't lookup special cases. You can solve what you try with context http://i18next.com/pages/doc_features.html#context
|
I completely misunderstood the plural functionality, but your workaround is perfect. Thanks! |
glad we found a solution. if you encounter any other issue, just let me know. |
I still can't manage to make plural form work in any language from Jade template. .text=t("key", {count : 0}) // displays : default { I understand that plural forms are specific to languages but it looks like i still don't understand how it works. |
looks strange to me:
the when i run the tests in the client repository https://github.com/jamuhl/i18next/blob/master/spec/translate/translate.plurals.spec.js it works correctly...wondering where the problem with 0 and 2 comes from |
I'm trying to get complicated plurals to work, here is a test code:
Which produces the following output
With this translation file:
I've been trying to understand the code behind this, but I can't get it to work.
The text was updated successfully, but these errors were encountered: