style(translation): adds comment about lang auto detection

This commit is contained in:
paweldomas 2016-10-28 10:54:35 -05:00
parent 01581196f0
commit e349cc59ad
1 changed files with 5 additions and 0 deletions

View File

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