1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-23 00:05:22 +03:00

i18next: assign languageChanged hook after initialization

This commit is contained in:
Kyle K 2019-10-29 23:16:52 +00:00
parent c2423badfc
commit d2623dcb11

View file

@ -31,17 +31,17 @@ i18n.init = function(cb) {
console.log('i18n system loaded');
var detectedLanguage = i18n.getMessage('language_' + getValidLocale("DEFAULT"));
i18n.addResources({"detectedLanguage": detectedLanguage });
i18next.on('languageChanged', function (newLang) {
i18n.localizePage(true);
updateStatusBarVersion();
});
}
if (cb !== undefined) {
cb();
}
});
});
// This function should do the same things that the i18n.localizePage function below does.
i18next.on('languageChanged', function (newLang) {
i18n.localizePage(true);
updateStatusBarVersion();
});
}
i18n.changeLanguage = function(languageSelected) {