Marcus Buck wrote:
Mediawiki provides no real support for truly multilingual wikis at all. Despite the fact that the prominent multilingual wikis Commons and Meta are around since 2004 and 2001 respectively. Making Mediawiki truly multilingual is a heavy task. There are at least a dozen things that come up in my mind where Mediawiki sucks multilinguality-wise. But a simple first starting step would be to create a global variable like "$wgMultilingualWiki = true/false" and if it is set to true the content language will automatically be set to the language set in the preferences. That will remove several problems like the wrong tab order for RTL languages or the fact that {{PLURAL: }} doesn't work correctly for any language with a different plural structure than English.
I was going to suggest more or less the same thing. Although I don't think blindly setting $wgContLang = $wgLang is really a good idea -- too many things would break if we did that.
(For example, {{PLURAL:}} really _has_ to be parsed according to the language the page/message is written for, since the meaning of the params varies between languages. What making {{PLURAL:}} useful in multilingual page content really needs is a syntax for specifying the intended language inline. Anyone interested in trying that might want to note that there's a (currently incomplete) ParserFunctions-based reimplementation at http://commons.wikimedia.org/wiki/Template:Plural which tries to do just that.)
It would be better to just look for spots (like LTR/RTL rendering) where that can be safely done and sprinkle them with lines like:
global $wgMultilingual, $wgLang, $wgContLang; $lang = $wgMultilingual ? $wgLang : $wgContLang;
Alternatively, I suppose we could introduce a new global -- say, $wgInterfaceLang -- which could be set to equal either $wgLang or $wgContLang in Setup.php.