If lang is set by menu then force the use of that language see BT#13183

pull/2487/head
jmontoyaa 7 years ago
parent 86501d90b5
commit 6136a53d82
  1. 7
      main/inc/global.inc.php

@ -431,7 +431,6 @@ if (isset($this_script) && $this_script == 'sub_language') {
$valid_languages = api_get_languages();
if (!empty($valid_languages)) {
if (!in_array($user_language, $valid_languages['folder'])) {
$user_language = api_get_setting('platformLanguage');
}
@ -484,6 +483,12 @@ if (!empty($valid_languages)) {
if (isset($_GET['language'])) {
$language_interface = $user_language;
}
$allow = api_get_configuration_value('show_language_selector_in_menu');
// Overwrite all lang configs and use the menu language
if ($allow) {
$language_interface = $_SESSION['user_language_choice'];
}
}
// Sometimes the variable $language_interface is changed

Loading…
Cancel
Save