Closed Dexus closed 1 month ago
It loads only the fallback + preload languages.
const i18nextOptions: InitOptions = { load: 'languageOnly' as const, // Default language. lng: 'ru', // Logging i18next information to the console. debug: true, nonExplicitSupportedLngs: true, preload: ['en', 'de'], initImmediate: false, ns: ['translation', 'common', 'category', 'ui'], defaultNS: 'translation', supportedLngs: ['de','es','pl','ru','pt','fr'], nsSeparator: false, keySeparator: false, // Interpolation option to escape passed in // values to avoid XSS injection. interpolation: { escapeValue: true, }, // Language to use if translations in the // active language are not available. fallbackLng: "fr", saveMissing: true, backend: { loadPath: `${config.LOCALE_API_URL}/locales/{{lng}}/{{ns}}.json`, addPath: `${config.LOCALE_API_URL}/locales/{{lng}}/{{ns}}/`, reloadInterval: 3000 } }; console.log(i18nextOptions) i18next.use(HttpBackend).init(i18nextOptions).then(function (t) { //... })
It should load all supported Languages or at least the current set language + the preload + fallback.
No, if you want all supportedLngs to be loaded, you need to put them into the preload option... The supportedLngs option does not influence the loading, but the language resolution
🐛 Bug Report
It loads only the fallback + preload languages.
To Reproduce
Expected behavior
It should load all supported Languages or at least the current set language + the preload + fallback.
Your Environment