Commit 52361cc2 authored by Yann Leboulanger's avatar Yann Leboulanger

re-add spanish translation

parent 866274c1
......@@ -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', 'de', 'nl');
$availablelang = array('fr', 'en', 'de', 'nl', 'es');
$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', 'de' => 'de_DE', 'at' => 'de_DE', 'ch' => 'de_DE', 'nl' => 'nl_NL');
$lang_association = array('fr' => 'fr_FR', 'en' => 'en_US', 'de' => 'de_DE', 'at' => 'de_DE', 'ch' => 'de_DE', 'nl' => 'nl_NL', 'es' => 'es_ES');
$lang = $lang_association[$language];
putenv("LANG=$lang");
setlocale(LC_ALL, $lang);
......@@ -120,6 +120,7 @@ function Entete ($titre, $texte, $p="")
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=de\"><img src=\"imgs/de_flag.png\" alt=\"de_flag\" title=\"Webseite in Deutsch\" /></a>\n";
echo " <a href = \"$page?lang=nl\"><img src=\"imgs/nl_flag.png\" alt=\"nl_flag\" title=\"Website in Dutch\" /></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 " </div> <!-- translator -->\n</div> <!-- logo -->\n";
echo "<div class=\"menu\">\n";
while ( list ($libelle, $ancre) = each ($menu)){
......
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