Nikolay Suslov vor 7 Jahren
Ursprung
Commit
c49e29a88a

+ 1 - 1
support/client/lib/index.html

@@ -102,7 +102,7 @@ SOFTWARE.
         var application;
 
         window._LangManager = new Lang;
-        _LangManager.setLanguage(_LangManager.getLocale()).then(res => {
+        _LangManager.setLanguage().then(res => {
 
             vwf.loadConfiguration(application, userLibraries, compatibilityCheck);
 

+ 5 - 1
support/client/lib/vwf/view/lib/polyglot/language.js

@@ -19,7 +19,11 @@ class Lang {
     }
 
    async setLanguage(langID) {
-       let phrases = await this.getLang(langID);
+       var currentLang = localStorage.getItem('krestianstvo_locale');
+      if (langID) {
+        currentLang = langID
+      }
+       let phrases = await this.getLang(currentLang);
        this.language = new Polyglot({ phrases });
 
         // this.getLang(langID).then(phrases => {