[pmwiki-users] skins and RTL wikis

Petko Yotov 5ko at 5ko.fr
Fri Jun 9 12:02:07 CDT 2017

On 2017-06-09 17:03, Hans wrote:
> I can see on pmwiki.org that
> the Arabic group PmWikiAr has text flowing right to left, and all
> text is right aligned. Further the SideBar is displayed right,
> opposite to its left default for the default skin.
> http://www.pmwiki.org/wiki/PmWikiAr/PmWikiAr
> The Farsi (Persian) group PmWikiFa has text flowing right to left
> as well, but only the Farsi text. The SideBar is on the left as
> per default.
> http://www.pmwiki.org/wiki/PmWikiFa/PmWikiFa
> Both pages linked to contain a markup directive
> (:Language: Arabic|Farsi:), and I wonder what this does.

This is a PageTextVariable, used in PmWiki.OtherLanguages. Page text 
variables are string variables created in the wiki text of a page, and 
can be automatically made available for inclusion in other pages:


> The Farsi page is structured with div markup with the parameter
> dir="rtl", which I assume makes the text flow right to left, whereas
> the Arabic page does not have this, but the text flows right to left
> nonetheless. So how is that achieved? And are there group-specific
> config settings, which switch the SideBar to the other side?

This is in local/PmWikiAr.php:

   $HTMLStylesFmt['rtl'] = 'body { direction:rtl; }';

Now also added to local/PmWikiFa.php.

Alternatively, this 'body { direction:rtl; }' can be added to 
pub/css/local.css or to a pub/css/Group.css.

> If there are automatic switches a skin could use, then I would love to
> learn about these, so I can employ them in my Amber skin to change
> position of some skin page elements automatically, if possible.

No, there are no automatic switches AFAIK.

> I see in PmWiki/Questions http://www.pmwiki.org/wiki/PmWiki/Questions
> this till yet unanswered question:
> How can I have an RTL PmWiki and customize and Translate PmWiki for
> rtl languages such as Persian, Hebrew and...? If it needs programing
> can you tell me what I should do with PmWiki and where I should begin,
> Please?
> PmWiki/Internationalizations
> http://www.pmwiki.org/wiki/PmWiki/Internationalizations
> does not address the question of RTL Wikis either, and I thought that
> would be the obvious place to document something about this.
> This is also linked to UTF-8, and setting up a well functioning UTF-8

Feel free to reply to any questions where you know the answers, or where 
you have the free time to investigate and find the answers. :-) Same for 
the documentation: please improve it anywhere you feel it can be 

Both Ar and Fa groups have XLPages so people started translating them, 
and the interface appears translated. I don't read any such language so 
I have now way of knowing if anything is correctly displayed or if 
something (what?) needs fixing - any input from a person who does read 
some of these languages may help improve right-to-left support.

> I see that by including scripts/xlpage-utf-8.php classes for
> rtl and ltr are added automatically.

Only CSS classes are defined so that you can easily use for example 
 >>rtl<< or >>ltr<< in a mixed-language page, and the indented blocks inside RTL elements are correctly indented from right instead of from left and vice versa.


Change log     :  http://www.pmwiki.org/wiki/PmWiki/ChangeLog
Release notes  :  http://www.pmwiki.org/wiki/PmWiki/ReleaseNotes
If you upgrade :  http://www.pmwiki.org/wiki/PmWiki/Upgrades

More information about the pmwiki-users mailing list