[SPIP] ~v3.0.20-->v3.0.25
[lhc/web/clavette_www.git] / www / ecrire / inc / lang.php
index 169692e..208338a 100644 (file)
@@ -3,7 +3,7 @@
 /***************************************************************************\
  *  SPIP, Systeme de publication pour l'internet                           *
  *                                                                         *
- *  Copyright (c) 2001-2014                                                *
+ *  Copyright (c) 2001-2016                                                *
  *  Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James  *
  *                                                                         *
  *  Ce programme est un logiciel libre distribue sous licence GNU/GPL.     *
@@ -110,7 +110,7 @@ function traduire_nom_langue($lang) {
 // C'est utilise par #LANG_DIR, #LANG_LEFT, #LANG_RIGHT.
 // http://doc.spip.org/@lang_dir
 function lang_dir($lang='', $droitier='ltr', $gaucher='rtl') {
-       static $lang_rtl = array('ar', 'fa', 'ku', 'ps', 'ur', 'he', 'heb', 'hbo', 'yi');
+       static $lang_rtl = array('ar', 'fa', 'ku', 'prs', 'ps', 'ur', 'he', 'heb', 'hbo', 'yi');
 
        return in_array(($lang ? $lang : $GLOBALS['spip_lang']), $lang_rtl) ?
                $gaucher : $droitier;
@@ -419,8 +419,8 @@ function init_langues() {
        if (!isset($GLOBALS['meta']['langue_site'])) {
                // Initialisation : le francais si dispo, sinon la premiere langue trouvee
                $GLOBALS['meta']['langue_site'] = $tout =
-               (!$all_langs OR (strpos(',fr,',",$all_langs,")!==false))
-                 ? 'fr' :  substr($all_langs,0,strpos($all_langs,','));
+               (!$all_langs OR (strpos(','._LANGUE_PAR_DEFAUT.',',",$all_langs,")!==false))
+                 ? _LANGUE_PAR_DEFAUT :  substr($all_langs,0,strpos($all_langs,','));
                ecrire_meta('langue_site', $tout);
        }
 }