[Mediawiki-l] Sidebar on the right

Alexis Moinet alexis.moinet at fpms.ac.be
Fri Jul 6 07:34:36 UTC 2007


Daniel Israel wrote :
> I could do this.  But I thought the bar side switched for right to 
> left languages.  Doesn't this mean the functionality is already 
> there?  

yes, in skins/monobook/rtl.css

> Is there a way to set that switch without mucking about in all the settings?

yes, insert it in monobook.php :

look for :

if($this->data['usercss'   ]) { ?>
		<style type="text/css"><?php $this->html('usercss'   ) ?></style>
<?php	}

change it to

if($this->data['usercss'   ]) { ?>
		<style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/rtl.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";<?php $this->html('usercss'   ) ?></style>
<?php	}

*but* the text will also be aligned on the right, the tabs are inverted, etc ..., so it might be a starting point, but you'll have to change things anyway

for instance, if you want the text aligned on the left, change it in rtl.css (or do it in [[Mediawiki:Monobook.css]])

body {
	direction: ltr; /*instead of : direction: rtl;*/
	...
}

or in [[Mediawiki:Monobook.css]] / [[Mediawiki:Common.css]] edit and add (it will overwrite rtl.css property for body direction):

body {
     direction: ltr;
}

and so on for all the css specific to rtl languages.






More information about the MediaWiki-l mailing list