-
Hey team, My next-i18next.config.js looks like: i18n: {
locales: ["en", "zh-hant", "zh-hans", "moo"],
defaultLocale: "en",
} and my folder structure looks like:
I can switch locales in the webapp (using route based locales) and the props value is correct, but the console logs from my two attempts
and successful:
Any help very much appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Ok weird! While digging through discussions here I saw how to enable debugging and found some very interesting logs.
This is a bit weird, in that nowhere do I specify 'zh-Hant' in my code or config - I always use lowercase for the entire value. Somehow i18next is uppercasing the first letter of the variant I'm using. I realize the capitalization might be more in accordance with language standards, but I prefer the aesthetics of all lowercase. It seems odd that the library would enforce this capitalization but allow me to define my own arbitrary language string (in this case, the 'moo' language). Is this expected behaviour? |
Beta Was this translation helpful? Give feedback.
-
Use the correct language codes and try again: https://www.i18next.com/how-to/faq#how-should-the-language-codes-be-formatted |
Beta Was this translation helpful? Give feedback.
Use the correct language codes and try again: https://www.i18next.com/how-to/faq#how-should-the-language-codes-be-formatted