React Typescript i18n: i18next::translator: 缺少 en 语言的翻译

huangapple go评论64阅读模式
英文:

React Typescript i18n : i18next::translator: missingKey en translation

问题

I have been trying to use the 'backend' option to load my translations but seeing 'missing_key' for all the translations. Attached are the screenshots of my code. Any help will be appreciated.

英文:

I have been trying to use 'backend' option to load my translations but seeing 'missing_key' for all the translations. Attached are the screenshots of my code. Any help will be appreciated.

React Typescript i18n: i18next::translator: 缺少 en 语言的翻译

React Typescript i18n: i18next::translator: 缺少 en 语言的翻译

React Typescript i18n: i18next::translator: 缺少 en 语言的翻译

React Typescript i18n: i18next::translator: 缺少 en 语言的翻译

答案1

得分: 0

检查您的翻译文件中的键是否相匹配。它们必须是相同的,例如:

en/translation.json

{
  "name": "Name"
}

fr/translation.json

{
  "name": "Nom"
}
英文:

Check if the keys in your translation files match each other. They must be identical, example:

en/translation.json

{
  "name": "Name"
}

fr/translation.json

{
  "name": "Nom"
}

huangapple
  • 本文由 发表于 2023年7月31日 23:26:31
  • 转载请务必保留本文链接:https://go.coder-hub.com/76805051.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定