|
|
@ -51,14 +51,18 @@ if (isset($_REQUEST['language']) && !empty($_REQUEST['language']) && in_array($_ |
|
|
|
if (isset($_REQUEST['lang']) && !empty($_REQUEST['lang']) && in_array($_REQUEST['lang'], $available_langs)) { |
|
|
|
if (isset($_REQUEST['lang']) && !empty($_REQUEST['lang']) && in_array($_REQUEST['lang'], $available_langs)) { |
|
|
|
$lang_match = $chamilo_langs[$_REQUEST['lang']]; |
|
|
|
$lang_match = $chamilo_langs[$_REQUEST['lang']]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
global $_configuration; |
|
|
|
global $_configuration; |
|
|
|
$defaultLanguage = api_get_interface_language(); |
|
|
|
|
|
|
|
if (isset($_configuration['auto_detect_language_custom_pages']) && |
|
|
|
if (isset($_configuration['auto_detect_language_custom_pages']) && |
|
|
|
$_configuration['auto_detect_language_custom_pages'] == true |
|
|
|
$_configuration['auto_detect_language_custom_pages'] == true |
|
|
|
) { |
|
|
|
) { |
|
|
|
$defaultLanguage = $lang_match; |
|
|
|
// Auto detect |
|
|
|
|
|
|
|
$_user['language'] = $lang_match; |
|
|
|
|
|
|
|
$_SESSION['user_language_choice'] = $lang_match; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
// Chamilo default platform. |
|
|
|
|
|
|
|
$defaultLanguage = api_get_interface_language(); |
|
|
|
|
|
|
|
$_user['language'] = $defaultLanguage; |
|
|
|
|
|
|
|
$_SESSION['user_language_choice'] = $defaultLanguage; |
|
|
|
} |
|
|
|
} |
|
|
|
$_user['language'] = $defaultLanguage; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$_SESSION['user_language_choice'] = $lang_match; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|