[pmwiki-users] RTL text in LTR wiki

Donald Z. Osborn dzosborn at gmail.com
Fri Oct 16 22:18:39 CDT 2015


Petko, John, Thank you for the responses.

Petko, the coding has worked - with the most recent 3 lines for config.php
and the commands in the page. This is most appreciated.

That said, the text in the editing window is still left to right. It's a
little tricky to edit, but since it was already mostly-formatted text
copied over, it was doable. Some issues with the ordered list (number
style, order of numeral and period), so I manually entered the list item
numbers. But what I still find amazing is how well the text behaves overall
in the final view.*

I anticipate having another RTL text in N'Ko script (from West Africa) and
will see if this coding works for that too.

Are there any other PmWikis with chunks of text in Arabic or Hebrew?

All the best,

Don

* http://www.bisharat.net/wikidoc/pmwiki.php/Casablanca/بيان-الدار-البيضاء

On Thu, Oct 15, 2015 at 12:12 PM, Petko Yotov <5ko at 5ko.fr> wrote:

> On 2015-10-15 17:38, Petko Yotov wrote:
>
>> 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');
>>
>
> After reading a little about RTL, this may be better in config.php:
>
>   $WikiStyleCSS[] = "direction|unicode-bidi";
>   $WikiStyle['rtl'] = array('direction' => 'rtl',
> 'unicode-bidi'=>'bidi-override');
>   $WikiStyle['ltr'] = array('direction' => 'ltr',
> 'unicode-bidi'=>'bidi-override');
>
> Petko
>
>
>
>> 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
>>>
>>
> --
> 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
>
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20151016/0f0560be/attachment.html>


More information about the pmwiki-users mailing list