[pmwiki-users] RTL text in LTR wiki

Petko Yotov 5ko at 5ko.fr
Thu Oct 15 10:38:43 CDT 2015


On 2015-10-14 23:02, Donald Z. Osborn wrote:
> Is there a command or other means to make right-to-left text display
> correctly on a Europhone language wiki?

You can add a "direction" wikistyle in config.php:

   $WikiStyleCSS[] = "direction";


Then, in a wiki page, use it like this:

   >>direction=rtl<<
   (text right to left)
   >><<

or

   %p direction=rtl% (A paragraph)

   Normal text %direction=rtl% (right to left) %% normal text

It is even possible to define %rtl% and %ltr% wikistyles:

   $WikiStyleCSS[] = "direction";
   $WikiStyle['rtl'] = array('direction' => 'rtl');
   $WikiStyle['ltr'] = array('direction' => 'ltr');

Then use in a wiki page

   %p rtl% or >>rtl<< or %rtl%...%%

I wouldn't know how to test this (I don't read rtl languages) but if you 
confirm it works, we can add this to the core.


Petko

> 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

-- 
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