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 0cabe1f0079a764dd968fb16c4a83356aa00b47b..59eff5491a926f189dc330cd2ef1e7f41e34ae4e 100644 (file)
@@ -258,6 +258,19 @@ function set_up_language($sm_language, $do_search = false, $default = false) {
             putenv( "LANGUAGE=$longlocale" );
         }
        setlocale(LC_ALL, $longlocale);
             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');
        $squirrelmail_language = $sm_notAlias;
         if ($squirrelmail_language == 'ja_JP') {
             header ('Content-Type: text/html; charset=EUC-JP');