[pmwiki-users] RTL text in LTR wiki

John Rankin john.rankin at affinity.co.nz
Thu Oct 15 00:46:21 CDT 2015


The markup to html needs to produce the following:

<p dir="rtl" lang="ar"> ... </p>

The dir attribute tells the browser to display the text right to left and
the lang attribute says it's Arabic.

If the requirement is for one or two Arabic words in an English sentence,
then pmwiki needs to produce <span dir="rtl" lang="ar"> ... </span>.

The solution will depend on whether you need Arabic paragraphs, words and
phrases, or both.

For example:

Markup('arabic','directives','/\(:(ar)\s+(.*?)\s*:\)/',
    '<span dir="rtl" lang="'.$1.'">'.$2.'</span>';
);

should work. You would write (:ar text in Arabic :)

JR

> Is there a command or other means to make right-to-left text display
> correctly on a Europhone language wiki?
>
> I have a text in Arabic that comes out wrong, although the characters are
> okay. But the words are arranged left-to right.
>
> See:
> http://www.bisharat.net/wikidoc/pmwiki.php/Casablanca/%D8%A8%D9%8A%D8%A7%D9%86-%D8%A7%D9%84%D8%AF%D8%A7%D8%B1-%D8%A7%D9%84%D8%A8%D9%8A%D8%B6%D8%A7%D8%A1
>
> One other thing - Arabic words in page titles work, but if there is more
> than one word in the title, the software's default to join the words
> creates unfortuitous combinations due to that alphabet's letter joining
> characteristics (hence, I inserted hyphens).
>
> TIA for any pointers,
>
> Don Osborn
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>


-- 
John Rankin




More information about the pmwiki-users mailing list