Available languages are sorted by their true names

This commit is contained in:
Loïc Chapeaux
2001-08-28 10:08:20 +00:00
parent a6c0edc9e5
commit 872cf43d62
3 changed files with 32 additions and 3 deletions

View File

@@ -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);
?>