소스 검색

adding three global variables. Allows to use correct alignment without html_tag function

tokul 21 년 전
부모
커밋
6ca14c8980
1개의 변경된 파일13개의 추가작업 그리고 0개의 파일을 삭제
  1. 13 0
      functions/i18n.php

+ 13 - 0
functions/i18n.php

@@ -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');