next-translate
next-translate copied to clipboard
Japanese plural wants to use _one for count: 1 against CLDR
What version of this package are you using? 2.5.2
What operating system, Node.js, and npm version? MacOS 13.5, node v18.1.0, npm 9.8.1
What happened?
After using t('cart-message', { count: 1 })
it shows the key instead of translation for Japanese.
{
"cart-message_other": "The cart has {{count}} products",
}
What did you expect to happen?
It should use only _other
for Japanese according to CLDR
I tried ja and jp locales, it always wants to use _one
for count: 1.
I tried and works fine. It should work with ja
, we are using PluralRules from EcmaScript:
If is not working fine with ja
, probably is not related to plurals and can be related to another thing. Would be great if you can share a repo reproducing the error to help us to identify the error.
Thank you for the response!
https://codesandbox.io/p/sandbox/japanese-next-translate-qcxpxr
I've managed to find some next-translate codesandbox template and adjust it to my case. It's not very stable for me but if you refresh whole page or internal window enough times it works 😛
You have to add /en
or /jp
to url to see something more than 404.
This example also works like I described for both JP and JA.