Does ikiwiki support RTL languages? I read somewhere it does, but I don't see any mention of that here (or anywhere else... that info may be wrong).

I'd like to add RTL support to my wiki, for text direction and maybe for the page layout too. Before I edit my CSS, page.tmpl and possibly Perl for automatic direction setting - does ikiwiki support this in any way?

On my wiki (ikiwiki version from Debian 7 stable) everything is aligned to the left, and unicode RTL characters cannot change that - the .tmpl and css files would need to be changed, it seems.

I will happily share my insights and code, if I manage to get anything useful to work :-)

--fr33domlover

Hi,

You need ikiwiki 3.20140227 or newer, which includes the patch to expose the language code/direction see expose html language and direction After which you need to modify the templates to make use of the tags.

I'm currently running this on http://addons.nvda-project.org The config/templates can be found here

I haven't investigated how this functions when the po plugin is disabled, but I am guessing that you can simply enable the po plugin, define your master language, and miss out any slave languages.

I would be intrested to hear feedback/what you got to work, as we are a bunch of blind people running the project above, so the correct markup was the goal in our case, I haven't had any feedback on its visual appearance.

--mhameed

Comment by Mesar Sat Aug 30 13:53:53 2014

I couldn't figure out how to make a comment on the commandline so I made this:

PO and RTL support

The Arabic pages on your wiki seem to have the Arabic in LTR, instead of the intended RTL. The reason may be that the PO plugin does not generate each slave page from scratch, but rather uses the original page, which causes slave pages to have language 'en' and direction LTR. I didn't verify this yet. If you do check this, please share results here :)

What I got to work so far is RTL chunks inside LTR pages. It doesn't replace the PO plugin but it can be used to make PO+RTL work:

Right-to-left (RTL) page text

Comment by fr33domlover Wed Sep 17 02:57:41 2014

The Arabic pages on your wiki seem to have the Arabic in LTR, instead of the intended RTL

As I said on the other forum thread, it does look to me as though it is RTL; the display bug is that it's left-justified (text-align: left) because the blueview stylesheet explicitly (and unnecessarily?) left-aligns text.

You can test RTL/LTR in English by putting a distinctive directionless punctuation character at the beginning and end of a paragraph like this:

<p dir="ltr">• This renders with a bullet on the left and an ellipsis on the right…</p>
<p dir="rtl">• This renders with a bullet on the right and an ellipsis on the left…</p>

The actual text still goes left-to-right because Latin characters are known to be left-to-right by the Unicode bidi algorithm, but the punctuation moves around, and in ikiwiki themes other than blueview and goldtype, the alignment changes too:

• This renders with a bullet on the left and an ellipsis on the right…

• This renders with a bullet on the right and an ellipsis on the left…

More test-cases:

Comment by smcv Thu Oct 23 03:57:39 2014