2005-04-02 15:51:45 +00:00
|
|
|
<?php
|
|
|
|
require_once("../inc/util.inc");
|
|
|
|
require_once("../inc/translation.inc");
|
|
|
|
$imgdir = "img/flags/";
|
|
|
|
|
|
|
|
|
|
|
|
$languages = getSupportedLanguages();
|
2005-12-06 23:00:44 +00:00
|
|
|
$prefs = $HTTP_SERVER_VARS["HTTP_ACCEPT_LANGUAGE"];
|
2005-04-02 15:51:45 +00:00
|
|
|
|
2005-12-06 23:00:44 +00:00
|
|
|
$set_lang = get_str("set_lang", true);
|
|
|
|
if ($set_lang){
|
|
|
|
if (!in_array($set_lang, $languages) && $set_lang="auto"){
|
|
|
|
error_page("Language $set_lang is not supported");
|
2005-04-02 15:51:45 +00:00
|
|
|
} else {
|
2005-12-06 23:00:44 +00:00
|
|
|
setcookie('lang', $set_lang, time()+3600*24*365);
|
2005-04-05 06:43:58 +00:00
|
|
|
header("Location: index.php");
|
2005-04-02 18:37:22 +00:00
|
|
|
exit;
|
2005-04-02 15:51:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
page_head("Language selection");
|
|
|
|
|
|
|
|
echo "
|
2005-04-02 18:37:22 +00:00
|
|
|
<p>
|
2005-12-06 23:00:44 +00:00
|
|
|
This web site is available in several languages.
|
|
|
|
The currently selected language is: <em>".tr(LANG_NAME_INTERNATIONAL)."</em> (".tr(LANG_NAME_NATIVE).").
|
|
|
|
<p>
|
2005-04-02 18:37:22 +00:00
|
|
|
Normally the choice of language
|
2005-12-06 23:00:44 +00:00
|
|
|
is determined by your browser's language setting,
|
|
|
|
which is: <b>$prefs</b>.
|
|
|
|
You can change this setting using:
|
|
|
|
<ul>
|
|
|
|
<li>Mozilla: Tools/Options/General
|
|
|
|
<li>Microsoft IE: Tools/Internet Options/Languages
|
|
|
|
</ul>
|
|
|
|
<p>
|
|
|
|
Or you can select a language by clicking on one of the links.
|
|
|
|
This will send your browser a cookie;
|
|
|
|
make sure your browser accepts cookies from our domain.
|
2005-04-02 18:37:22 +00:00
|
|
|
</p>
|
|
|
|
";
|
2005-04-02 15:51:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
start_table();
|
2005-04-05 06:43:58 +00:00
|
|
|
row2("Language symbol", "Language name (click to select)");
|
2005-12-06 23:00:44 +00:00
|
|
|
row2("",
|
|
|
|
"<a href=language_select.php?set_lang=auto>Use browser language setting</a>"
|
|
|
|
);
|
2005-04-02 15:51:45 +00:00
|
|
|
for ($i=0; $i<sizeof($languages);$i++){
|
|
|
|
$lang_native[$i] = trSpecific(LANG_NAME_NATIVE,$languages[$i]);
|
|
|
|
$lang_international[$i] = trSpecific(LANG_NAME_INTERNATIONAL, $languages[$i]);
|
|
|
|
}
|
|
|
|
|
|
|
|
array_multisort($lang_international, $languages, $lang_native);
|
|
|
|
|
|
|
|
for ($i=0; $i<sizeof($languages);$i++){
|
2005-04-05 06:43:58 +00:00
|
|
|
// if (file_exists($imgdir.$languages[$i].".png")){
|
|
|
|
// $im = "<a href=\"language_select.php?set_lang=".$languages[$i]."\"><img src=\"".$imgdir.$languages[$i].".png\" border=0></a>";
|
|
|
|
// } else {
|
|
|
|
// $im="";
|
|
|
|
// }
|
|
|
|
// row3($im,
|
|
|
|
row2(
|
2005-04-02 18:37:22 +00:00
|
|
|
"<a href=\"language_select.php?set_lang=".$languages[$i]."\">".$languages[$i]."</a>",
|
2005-04-05 21:26:41 +00:00
|
|
|
"<a href=\"language_select.php?set_lang=".$languages[$i]."\">".$lang_international[$i]."</a>"
|
2005-04-02 18:37:22 +00:00
|
|
|
);
|
2005-04-02 15:51:45 +00:00
|
|
|
}
|
|
|
|
end_table();
|
2005-04-05 21:26:41 +00:00
|
|
|
echo "
|
|
|
|
<p>
|
2005-12-06 23:00:44 +00:00
|
|
|
Translations are done by volunteers.
|
|
|
|
If your native language is not here,
|
|
|
|
<a href=translate.php>you can help</a>.
|
2005-04-02 18:37:22 +00:00
|
|
|
";
|
2005-04-02 15:51:45 +00:00
|
|
|
page_tail();
|
|
|
|
?>
|