Search code examples
localizationinternationalizationi18next

i18next missing key whereas the key exists?


I often get the following error:

i18next::translator: missingKey fr common my key.

whereas the key is in the translation file (which is correctly loaded and taken into account). Why?

Edit: This happens when I have a . (dot character) in a key in the translation file.


Solution

  • The translation file must be a valid JSON file and cannot contain keys with the . (dot) character. i18next will complain of a missing key if the key contains a dot.