Update of /home/spip-cvs/spip/ecrire
In directory miel:/tmp/cvs-serv21152/ecrire
Modified Files:
inc_lang.php3
Log Message:
bug gestion des langues (Laurent Laville)
Index: inc_lang.php3
RCS file: /home/spip-cvs/spip/ecrire/inc_lang.php3,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -d -r1.87 -r1.88
--- inc_lang.php3 15 Dec 2003 21:47:53 -0000 1.87
+++ inc_lang.php3 28 Dec 2003 18:59:53 -0000 1.88
@@ -177,7 +177,13 @@
function traduire_nom_langue($lang) {
- $codes_langues = array(
+ $r = $GLOBALS['codes_langues'][$lang];
+ if (!$r) $r = $lang;
+ return $r;
+}
+
+function init_codes_langues() {
+ $GLOBALS['codes_langues'] = array(
'aa' => "Afar",
'ab' => "Abkhazian",
'af' => "Afrikaans",
@@ -326,14 +332,8 @@
'za' => "Zhuang",
'zh' => "中文",
'zu' => "Zulu");
- $GLOBALS['codes_langues'] = $codes_langues;
-
- $r = $codes_langues[$lang];
- if (!$r) $r = $lang;
- return $r;
}
-
//
// Filtres de langue
//
@@ -503,6 +503,7 @@
}
}
}
+ init_codes_langues();
}
init_langues();