Browse Source

style(translation): adds comment about lang auto detection

j8
paweldomas 8 years ago
parent
commit
e349cc59ad
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      modules/translation/translation.js

+ 5
- 0
modules/translation/translation.js View File

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

Loading…
Cancel
Save