Commit 01c64da6 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

Hide not enough translated pages

parent 5ca28604
......@@ -58,7 +58,7 @@ function get_language()
$preflang = get_pref_language_array($_SERVER["HTTP_ACCEPT_LANGUAGE"]);
else
$preflang = array(0 => 'en');
$availablelang = array('fr', 'en', 'es', 'bg', 'pt-br', 'eo', 'ru', 'de', 'it', 'pl', 'hu', 'he', 'ar', 'nl');
$availablelang = array('fr', 'en', 'de', 'nl');
$result = array_intersect($preflang, $availablelang);
if (count($result) != 0)
$language = $result[0];
......@@ -73,7 +73,7 @@ function Entete ($titre, $texte, $p="")
session_start();
// print_r($_SERVER);
$language = get_language();
$lang_association = array('fr' => 'fr_FR', 'en' => 'en_US', 'es' => 'es_ES', 'bg' => 'bg_BG', 'pt' => 'pt_BR', 'pt-br' => 'pt_BR', 'eo_EO' => 'eo', 'eo_XX' => 'eo', 'eo' => 'eo', 'ru' => 'ru_RU', 'de' => 'de_DE', 'at' => 'de_DE', 'ch' => 'de_DE', 'it' => 'it_IT', 'pl' => 'pl_PL', 'hu' => 'hu_HU', 'he' => 'he_IL', 'ar' => 'ar_AE', 'nl' => 'nl_NL');
$lang_association = array('fr' => 'fr_FR', 'en' => 'en_US', 'de' => 'de_DE', 'at' => 'de_DE', 'ch' => 'de_DE', 'nl' => 'nl_NL');
$lang = $lang_association[$language];
putenv("LANG=$lang");
setlocale(LC_ALL, $lang);
......@@ -116,19 +116,9 @@ function Entete ($titre, $texte, $p="")
echo " <div id=\"translator\">\n";
echo _(" Language:")."<br />\n";
echo " <a href = \"$page?lang=bg\"><img src=\"imgs/bg_flag.png\" alt=\"bg_flag\" title=\"Страницата на български език\" /></a>\n";
echo " <a href = \"$page?lang=en\"><img src=\"imgs/en_flag.png\" alt=\"en_flag\" title=\"Website in English\" /></a>\n";
echo " <a href = \"$page?lang=eo\"><img src=\"imgs/eo_flag.png\" alt=\"eo_flag\" title=\"Retpaĝaro en Esperanto\" /></a>\n";
echo " <a href = \"$page?lang=es\"><img src=\"imgs/es_flag.png\" alt=\"es_flag\" title=\"Web en español\" /></a>\n";
echo " <a href = \"$page?lang=fr\"><img src=\"imgs/fr_flag.png\" alt=\"fr_flag\" title=\"Site en français\" /></a>\n";
echo " <a href = \"$page?lang=pt-br\"><img src=\"imgs/pt_br_flag.png\" alt=\"pt_BR_flag\" title=\"site em português\" /></a>\n";
echo " <a href = \"$page?lang=ru\"><img src=\"imgs/ru_flag.png\" alt=\"ru_flag\" title=\"Сайт на русском языке\" /></a>\n";
echo " <a href = \"$page?lang=de\"><img src=\"imgs/de_flag.png\" alt=\"de_flag\" title=\"Webseite in Deutsch\" /></a>\n";
echo " <a href = \"$page?lang=it\"><img src=\"imgs/it_flag.png\" alt=\"it_flag\" title=\"Sito in italiano\" /></a>\n";
echo " <a href = \"$page?lang=pl\"><img src=\"imgs/pl_flag.png\" alt=\"pl_flag\" title=\"Strona w języku Polskim\" /></a>\n";
echo " <a href = \"$page?lang=hu\"><img src=\"imgs/hu_flag.png\" alt=\"hu_flag\" title=\"Weboldal magyarul\" /></a>\n";
echo " <a href = \"$page?lang=he\"><img src=\"imgs/he_flag.png\" alt=\"he_flag\" title=\"אתר הרשת בעברית\" /></a>\n";
echo " <a href = \"$page?lang=ar\"><img src=\"imgs/ar_flag.png\" alt=\"ar_flag\" title=\"الموقع باللغة العربية\" /></a>\n";
echo " <a href = \"$page?lang=nl\"><img src=\"imgs/nl_flag.png\" alt=\"nl_flag\" title=\"Website in Dutch\" /></a>\n";
echo " </div> <!-- translator -->\n</div> <!-- logo -->\n";
echo "<div class=\"menu\">\n";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment