Available languages are sorted by their true names
This commit is contained in:
@@ -114,9 +114,12 @@ if (!isset($lang)) {
|
||||
if (isset($HTTP_GET_VARS) && !empty($HTTP_GET_VARS['lang'])) {
|
||||
$lang = $HTTP_GET_VARS['lang'];
|
||||
}
|
||||
if (isset($HTTP_POST_VARS) && !empty($HTTP_POST_VARS['lang'])) {
|
||||
else if (isset($HTTP_POST_VARS) && !empty($HTTP_POST_VARS['lang'])) {
|
||||
$lang = $HTTP_POST_VARS['lang'];
|
||||
}
|
||||
else if (isset($HTTP_COOKIE_VARS) && !empty($HTTP_COOKIE_VARS['lang'])) {
|
||||
$lang = $HTTP_COOKIE_VARS['lang'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -154,7 +157,10 @@ if (empty($lang)) {
|
||||
$lang = $cfgDefaultLang;
|
||||
}
|
||||
|
||||
// Define the associated filename and load the translation
|
||||
// Puts the retained language in a cookie that will expire in one year
|
||||
setcookie('lang', $lang, time() + 60*60*24*365);
|
||||
|
||||
// Defines the associated filename and load the translation
|
||||
$lang_file = $lang_path . $available_languages[$lang][1] . '.inc.php3';
|
||||
require('./' . $lang_file);
|
||||
?>
|
Reference in New Issue
Block a user