From: Tim Starling Date: Mon, 7 Feb 2011 12:39:10 +0000 (+0000) Subject: Use the content language to set the skin direction, instead of the user language... X-Git-Tag: 1.31.0-rc.0~32142 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=0f821f0dcb53085a70e89d97cf130f5767426afb;p=lhc%2Fweb%2Fwiklou.git Use the content language to set the skin direction, instead of the user language. This makes the content readable and the UI messed up, instead of vice versa. 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. --- diff --git a/includes/resourceloader/ResourceLoaderContext.php b/includes/resourceloader/ResourceLoaderContext.php index cbd04a6dd3..808ec505f8 100644 --- a/includes/resourceloader/ResourceLoaderContext.php +++ b/includes/resourceloader/ResourceLoaderContext.php @@ -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;