Hello!
I tried changing the Chinese (Taiwan) language code in supportedLngs from zh-TW to tw-TW in the config.js file and also renamed the zh-TW folder in the locales directory to tw-TW.
|
Before
|
After
|
/* src/i18n/config.js */
// Add names for each locale to
// show the user in our locale
// switcher.
export const supportedLngs = {
"en-US": "English",
"de-DE": "Deutsch",
"zh-TW": "繁體中文",
"zh-CN": "简体中文",
"pt-BR": "Português (BR)"
}
|
/* src/i18n/config.js */
// Add names for each locale to
// show the user in our locale
// switcher.
export const supportedLngs = {
"en-US": "English",
"de-DE": "Deutsch",
"tw-TW": "繁體中文",
"cns-CN": "简体中文",
"br-BR": "Português (BR)",
"jp-JP": "日本語"
}
|
When I tested it, I got this error: i18next::languageUtils: rejecting language code not found in supportedLngs: ak-TW
I've tested with cns-CN, br-Br and jp-JP, and those work fine.
de-DE Deutsch | cns-CN 简体中文 | br-Br Português (BR) | jp-JP 日本語 |
 |
 |
 |
 |
My main goal is to make sure it displays correctly in other languages, but I'm not really sure how to configure the i18n settings.
I also tried a few other approaches, but none of them worked.
Another idea I had was to use region codes instead of language codes, and just keep the original supportedLngs values.
I'm not sure if there's a better way, so I'd like to open this up for discussion.
Thank you!
Hello!
I tried changing the
Chinese (Taiwan)language code insupportedLngsfromzh-TWtotw-TWin theconfig.jsfile and also renamed thezh-TWfolder in the locales directory totw-TW.Before
After
When I tested it, I got this error:
i18next::languageUtils: rejecting language code not found in supportedLngs: ak-TWI've tested with
cns-CN,br-Brandjp-JP, and those work fine.Deutsch
简体中文
Português (BR)
日本語
My main goal is to make sure it displays correctly in other languages, but I'm not really sure how to configure the i18n settings.
I also tried a few other approaches, but none of them worked.
Another idea I had was to use region codes instead of language codes, and just keep the original
supportedLngsvalues.I'm not sure if there's a better way, so I'd like to open this up for discussion.
Thank you!