Index: trunk/extensions/Wikidata/App.php |
— | — | @@ -208,10 +208,12 @@ |
209 | 209 | |
210 | 210 | $wgRecordSetLanguage = 0; |
211 | 211 | |
212 | | - # malafaya: This is a hack to set page RTL according to user language prefs |
213 | | -# global $wgLang, $wgContLang, $wgIsUserRtl; |
214 | | -# $wgIsUserRtl = $wgLang->isRTL(); |
215 | | -# $wgContLang = $wgLang; // Set page contents language the same as user language (it will only affect RTL header) |
| 212 | + # malafaya: Set RTL according to user language |
| 213 | + global $wgLang, $wgOut; |
| 214 | + if ($wgLang->isRTL()) |
| 215 | + { |
| 216 | + $wgOut->addHTML('<style type="text/css">/*<![CDATA[*/ @import "/index.php?title=MediaWiki:Gadget-rtl.css&action=raw&ctype=text/css"; /*]]>*/</style>'); |
| 217 | + } |
216 | 218 | |
217 | 219 | return true; |
218 | 220 | } |