[SPIP] ~2.1.12 -->2.1.25
[velocampus/web/www.git] / www / ecrire / inc / lang.php
index 736b9d1..5f0efa7 100644 (file)
@@ -3,7 +3,7 @@
 /***************************************************************************\
  *  SPIP, Systeme de publication pour l'internet                           *
  *                                                                         *
- *  Copyright (c) 2001-2011                                                *
+ *  Copyright (c) 2001-2014                                                *
  *  Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James  *
  *                                                                         *
  *  Ce programme est un logiciel libre distribue sous licence GNU/GPL.     *
@@ -346,13 +346,16 @@ function init_langues() {
 }
 
 // http://doc.spip.org/@html_lang_attributes
-function html_lang_attributes()
+function html_lang_attributes($dir=true)
 {
+       if ($dir)
+               $dir = " dir='" . ($GLOBALS['spip_lang_rtl'] ? 'rtl' : 'ltr') . "'";
+
        return  "<html lang='"
        . $GLOBALS['spip_lang']
-       . "' dir='"
-       . ($GLOBALS['spip_lang_rtl'] ? 'rtl' : 'ltr')
-         . "'>\n" ;
+       . "'"
+       . $dir
+       . ">\n" ;
 }
 init_langues();
 utiliser_langue_site();