Problem with loading translations - missingKey

18 Views Asked by At

I have a website in reactjs that was working fine before. When I changed the system and installed everything again, problems with the language began - even though they are declared. What could be wrong?

file i18n.ts:

import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import LanguageDetector from 'i18next-browser-languagedetector';

i18n.use(LanguageDetector)                                                                                                                                          
 .use(initReactI18next)                                                                                                                                          
 .init({                                                                                                                                                             
      debug: true,                                                                                                                                                    
      fallbackLng: 'en',                                                                                                                                              
      resources: {
         en: {
             translation: {
                generic: {
                  loading: 'loading',
                 },
                links: {
                  priceCalculator: 'Price calculator',
.........

Web browser console:

[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.
[HMR] Waiting for update signal from WDS...
i18next: languageChanged en
i18next: initialized {debug: true, initImmediate: true, ns: Array(1), defaultNS: Array(1), fallbackLng: Array(1), …}
i18next: languageChanged en
i18next: init: i18next is already initialized. You should call init just once!
i18next: initialized {debug: true, initImmediate: true, ns: Array(1), defaultNS: Array(1), fallbackLng: Array(1), …}
i18next: languageChanged en
i18next: init: i18next is already initialized. You should call init just once!
i18next: initialized {debug: true, initImmediate: true, ns: Array(1), defaultNS: Array(1), fallbackLng: Array(1), …}
i18next::translator: missingKey en translation links.priceCalculator links.priceCalculator
i18next::translator: missingKey en translation links.tutorials links.tutorials
i18next::translator: missingKey en translation links.blog links.blog

0

There are 0 best solutions below