From 0f821f0dcb53085a70e89d97cf130f5767426afb Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Mon, 7 Feb 2011 12:39:10 +0000 Subject: [PATCH] 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. --- includes/resourceloader/ResourceLoaderContext.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.20.1