Przeglądaj źródła

style(translation): adds comment about lang auto detection

j8
paweldomas 8 lat temu
rodzic
commit
e349cc59ad
1 zmienionych plików z 5 dodań i 0 usunięć
  1. 5
    0
      modules/translation/translation.js

+ 5
- 0
modules/translation/translation.js Wyświetl plik

@@ -83,6 +83,11 @@ module.exports = {
83 83
         let options = defaultOptions;
84 84
 
85 85
         let lang = getLangFromQuery() || settingsLang || config.defaultLanguage;
86
+        // XXX If none of the above has been set then the 'lang' will be
87
+        // 'undefined' and the i18n lib will try to auto detect user's
88
+        // preferred language based on browser's locale.
89
+        // The interface config option allows to disable this auto detection
90
+        // by specifying the fallback language in that case.
86 91
         let langDetection = interfaceConfig.LANG_DETECTION;
87 92
 
88 93
         if (!langDetection && !lang) {

Ładowanie…
Anuluj
Zapisz