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:
commit
b2cc8e0f55
3 changed files with 10 additions and 10 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue