[i18n] Re: Correcting UI in RTL languages

persian-horde at metanetworking.com persian-horde at metanetworking.com
Tue Apr 19 13:10:15 PDT 2005


> First of all, I completely support the effort to make IMP and indeed
> all of Horde more RTL friendly. However, I'd prefer a different
> approach. I'd like to see different themes for RTL languages (or
> modifications of existing themes, like bluewhite-rtl). We should be
> able to achieve most modifications simply be changing text-align and
> float: styles. This will require patches to the IMP display code (and
> other parts of Horde), to use the right classes or to use the right
> markup to be controllable, but it'll avoid inserting lots of if ()
> statements into the code.
>
> -chuck

Hello all,
thanks chuck for your reply,

We could create a new theme for RTL languages, but this could not fix the
appearance problems in many cases. The problem is that in the most lines
of code, there is not any "class=" or "id=" attributes to be used in *.css
theme files.
Also many alignments are defined statically to be "left" or "right". For
example,
in
IMP 4.0 stable, imp/templates/compose/compose.inc, Line 65
we have:
<td nowrap="nowrap" align="left">

As you see the alignment is statically set to "left". To use themes to
correct RTL appearance, it's neccessary to define class or id attributes
in many tags and also omit many static alignments.

Another possible solution is to define two global variables for LEFT and
RIGHT aligments, and set their value based on language, for example:

$DIR and $DIR_REV. $DIR is set to "left" and $DIR_REV is set to "right"
for LTR languages and vice-versa for RTL languages. This solution omits
the "lots of if statements" problem, and is easy to implement. this way
the above code would be changed to:
<td nowrap="nowrap" align="<? echo $DIR ?>">

What's your opinion about this solution?

Thanks and Regards,
Horde Persian Team,




More information about the i18n mailing list