bidirectional languages

44 views
Skip to first unread message

Kalpa Welivitigoda

unread,
Apr 12, 2012, 6:15:29 AM4/12/12
to web...@googlegroups.com
Hi,

Does the translation feature of web2py support bidirectional languages?

Massimo Di Pierro

unread,
Apr 12, 2012, 8:26:19 AM4/12/12
to web...@googlegroups.com
Yes. You have to translate the CSS that determines the alignment as well.

Kalpa Welivitigoda

unread,
Apr 12, 2012, 9:22:09 AM4/12/12
to web...@googlegroups.com
On Thu, Apr 12, 2012 at 5:56 PM, Massimo Di Pierro
<massimo....@gmail.com> wrote:
> Yes. You have to translate the CSS that determines the alignment as well.
>

My translation file is applications/eden/languages/ur.py (eden is my
application name).

There I have an untranslated string as "Today (Monday)" and in Urdu
language which is a RTL it is displayed as "Today ((Monday".
I want to have the "(" and ")" in LTR and the rest in RTL.

How can I accomplish this?

>
> On Thursday, 12 April 2012 05:15:29 UTC-5, Kalpa Welivitigoda wrote:
>>
>> Hi,
>>
>> Does the translation feature of web2py support bidirectional languages?

--
Best Regards,

Kalpa Pathum Welivitigoda
http://about.me/callkalpa

Massimo Di Pierro

unread,
Apr 12, 2012, 2:09:40 PM4/12/12
to web...@googlegroups.com
You have to use something like in CSS

.rlt
{
direction:rtl;
}
.ltr
{
direction:ltr;
}

and use something like 

<span class={{=T('rtl')}}>{{=T('text')}}</span>

and translate the direction as you translate the text.

Kalpa Welivitigoda

unread,
Apr 13, 2012, 4:24:29 AM4/13/12
to web...@googlegroups.com
On Thu, Apr 12, 2012 at 11:39 PM, Massimo Di Pierro
<massimo....@gmail.com> wrote:
> You have to use something like in CSS
>
> .rlt
> {
> direction:rtl;
> }
> .ltr
> {
> direction:ltr;
> }
>
> and use something like
>
> <span class={{=T('rtl')}}>{{=T('text')}}</span>
>
> and translate the direction as you translate the text.
>

I didn't clearly get you, need some more clarification. Do you mind to
have a chat. I have already sent you an invitation via gtalk. Or else
if you are in skype or irc that would also be fine. Thanks in advance.

Reply all
Reply to author
Forward
0 new messages