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

Fix errors about using i18next before its properly initial… (#1782)

Fix errors about using i18next before its properly initial…
This commit is contained in:
Michael Keller 2019-10-31 19:12:12 +13:00 committed by GitHub
commit b2cc8e0f55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 10 deletions

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) {