From 209272f940679d6a522f4a495832ba6702e1504e Mon Sep 17 00:00:00 2001 From: Ilya Daynatovich Date: Fri, 28 Oct 2016 16:13:29 +0300 Subject: [PATCH] Add detect translation freeze in interface config --- interface_config.js | 1 + modules/translation/translation.js | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/interface_config.js b/interface_config.js index 1e07ad678..54a547f01 100644 --- a/interface_config.js +++ b/interface_config.js @@ -16,6 +16,7 @@ var interfaceConfig = { // eslint-disable-line no-unused-vars SHOW_POWERED_BY: false, GENERATE_ROOMNAMES_ON_WELCOME_PAGE: true, APP_NAME: "Jitsi Meet", + LANG_DETECTION: false, // Allow i18n to detect the system language INVITATION_POWERED_BY: true, /** * If we should show authentication block in profile diff --git a/modules/translation/translation.js b/modules/translation/translation.js index 5a39f83b6..6f3014dd5 100644 --- a/modules/translation/translation.js +++ b/modules/translation/translation.js @@ -83,6 +83,12 @@ module.exports = { let options = defaultOptions; let lang = getLangFromQuery() || settingsLang || config.defaultLanguage; + let langDetection = interfaceConfig.LANG_DETECTION; + + if (!langDetection && !lang) { + lang = DEFAULT_LANG; + } + if (lang) { options.lng = lang; }