mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-21 15:25:22 +03:00
i18next: assign languageChanged hook after initialization
This commit is contained in:
parent
c2423badfc
commit
d2623dcb11
1 changed files with 5 additions and 5 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