Fix notice when image is missing
[squirrelmail.git] / functions / i18n.php
index de0115f91ec4265b6a56c44e07a4aecf29895194..a56f4f426f07e10ea7ce185a8876b85159178b09 100644 (file)
@@ -415,8 +415,13 @@ function set_up_language($sm_language, $do_search = false, $default = false) {
         // Many functions expect English conversion rules.
         if ($sm_notAlias=='tr_TR') setlocale(LC_CTYPE,'C');
 
-        // Set text direction/alignment variables
-        // These don't appear to be used... are they safe to remove?
+        /**
+         * Set text direction/alignment variables
+         * When language environment is setup, scripts can use these globals 
+         * without accessing $languages directly and making checks for optional
+         * array key.
+         */
+        global $text_direction, $left_align, $right_align;
         if (isset($languages[$sm_notAlias]['DIR']) &&
             $languages[$sm_notAlias]['DIR'] == 'rtl') {
             /**