adding three global variables. Allows to use correct alignment without html_tag function
authortokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 26 Dec 2003 08:45:29 +0000 (08:45 +0000)
committertokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 26 Dec 2003 08:45:29 +0000 (08:45 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6322 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/i18n.php

index 0cabe1f..59eff54 100644 (file)
@@ -258,6 +258,19 @@ function set_up_language($sm_language, $do_search = false, $default = false) {
             putenv( "LANGUAGE=$longlocale" );
         }
        setlocale(LC_ALL, $longlocale);
+
+       // Set text direction/alignment variables
+       if (isset($languages[$sm_notAlias]['DIR']) && 
+               $languages[$sm_notAlias]['DIR'] == 'rtl') {
+           $text_direction='rtl';
+           $left_align='right';
+           $right_align='left';
+       } else {
+           $text_direction='ltr';
+           $left_align='left';
+           $right_align='right';
+       }
+
        $squirrelmail_language = $sm_notAlias;
         if ($squirrelmail_language == 'ja_JP') {
             header ('Content-Type: text/html; charset=EUC-JP');