I call the i18next change Language function by passing the language code (en-UK) like that :
var changeLng = function (varLng) {
i18next.changeLanguage('en', (err, t) => {
if (err) return console.log('something went wrong loading', err);
t('applog'); // -> same as i18next.t
});
};
I got the following issue :
VM4081 i18next.js:1912 Uncaught TypeError: Cannot read property 'toResolveHierarchy' of undefined
at setLng (VM4081 i18next.js:1912)
at I18n.changeLanguage (VM4081 i18next.js:1927)
at changeLng (VM4079 langUK.js:23)
at HTMLImageElement.<anonymous> (VM4079 langUK.js:8)
I assume that Something going wrong when i18next tries to execute that :
_this4.languages = _this4.services.languageUtils.toResolveHierarchy(l);
But I can't see what's needed to properly execute this. Thanks in advance for your support, Jack