Use the content language to set the skin direction, instead of the user language...
authorTim Starling <tstarling@users.mediawiki.org>
Mon, 7 Feb 2011 12:39:10 +0000 (12:39 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Mon, 7 Feb 2011 12:39:10 +0000 (12:39 +0000)
It's not ideal, but at least it's no worse than it was in 1.16. It's preferable because the content area is more likely to have bidirectional text than the UI area. The UI is split up into short strings, generally in a consistent language, so there is less chance of the UBA moving fragments of text around.

Ideally, the direction of each div would be set according to the language of the text it contains.

includes/resourceloader/ResourceLoaderContext.php

index cbd04a6..808ec50 100644 (file)
@@ -91,7 +91,8 @@ class ResourceLoaderContext {
                if ( $this->direction === null ) {
                        $this->direction = $this->request->getVal( 'dir' );
                        if ( !$this->direction ) {
-                               $this->direction = Language::factory( $this->language )->getDir();
+                               global $wgContLang;
+                               $this->direction = $wgContLang->getDir();
                        }
                }
                return $this->direction;