[Adium-devl] Localizations for RTL languages
Ofri Wolfus
ofri.wolfus at gmail.com
Sun Aug 13 18:01:24 UTC 2006
Hi all,
I was emailed by Oded Shopen, asking me about Hebrew localization and
so I came up with a little class that'll make this possible.
Basically, GUI in any RTL language needs to be an exact mirror of LTR
GUI, so my class checks for the active localization of the app and if
needed, mirrors all views in any window that is drawn to screen. It
has some small bugs with views that are moved manually and assume to
be in a specific location, but these are not so common and may be
easily fixed. (See http://www.dpompa.com/adium-rtl.jpg).
So my question is if we want this going into 1.0. The class is fully
self contained, and works as follows.
First, it checks for the value of the "DPDefaultDisplayDirection" key
in the Info.plist, which may be either "LTR" or "RTL". This value (if
found) represents the direction of the nibs set.
After that, the class checks the active localization of the app, and
its writing direction. If the writing direction differs from the
value defined for the default display direction, it'll automatically
mirror every view that's drawn in a window. Moving views inside a
window will act the same, but changing the superview of a view will
cause it to be mirrored again based on its new location in its new
superview.
Attached is an experimental diff from rev 17251 that uses my class.
In order to test it, make a copy of some .lproj directory and rename
it to an RTL language. Then set your main language in the
International panel to that language, and restart Adium.
Known bugs: 1. The To and From popups in the message window are drawn
in the wrong direction, and updates only when you move the mouse.
2. Only some of the tooltips get mirrored
3. That dialog for enabling/disabling plugins at startup gets messy
ToDo: Auto reordering of table columns?
- Ofri
- - - - - - - - - - - - - - - - - - -
http://www.dpompa.com
- - - - - - - - - - - - - - - - - - -

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20060813/f27e6cf9/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtl_localization_support.diff
Type: application/octet-stream
Size: 29864 bytes
Desc: not available
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20060813/f27e6cf9/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20060813/f27e6cf9/attachment-0003.html>
More information about the devel
mailing list