Re: Right-to-Left / Bidi / Arabic / Hebrew support in my app
Re: Right-to-Left / Bidi / Arabic / Hebrew support in my app
- Subject: Re: Right-to-Left / Bidi / Arabic / Hebrew support in my app
- From: Ken Ferry <email@hidden>
- Date: Mon, 31 Aug 2009 09:42:18 -0700
On Aug 31, 2009, at 8:51 AM, Marc Wandschneider <email@hidden
> wrote:
Thanks for the feedback. In general, I've found that while the
controls do,
indeed, seem to align the text correctly for input in bidi locales,
there is
little support in things like IB for putting the label on a box at
the top
right instead of the top-left,
NSBox in 10.6 will draw the label on the right side whenever -
[NSApplication userInterfaceLayoutDirection] is right to left.
-Ken
and also in code for determining what the
current writing direction is.
For example, I have a list I print out in my photo viewer that looks
like:
Filename | DSC0001.jpg
Size | 2072 x 2048 pixels
that should be:
DSC0001.JPG | [al-Filename]
3072 x 2048 pixels | [al-Size]
in Arabic / Hebrew, etc ...
It looks like I'll just have to use other controls to do the same
effect in
IB, and just check of locale.name == "ar" || "he" in code to do the
reverse
drawing.
Still kinda shocked that this is it ... Must be a lot of english
speakers
in the middle east :)
2009/8/28 Gideon King <email@hidden>
NSCell, NSControl, NSText, NSParagraphStyle etc all have
baseWritingDirection getters and setters which may be of some
help...I
believe the writing direction is determined on a paragraph by
paragraph
basis, but unless explicitly set uses the Unicode Bidi Algorithm
rules P2
and P3.
In many cases, people writing in an RTL locale need to include
English in
the text too, and the text system handles this nicely - I have seen
this
often with our NovaMind users creating Mind Maps in Hebrew and
Arabic.
I wasn't directly involved in the localization into Hebrew, but I
believe
that the controls just did the right thing - I certainly can't see
any code
that we had to put in to explicitly support it. Hope this helps.
Gideon
On 27/08/2009, at 12:35 PM, Marc Wandschneider wrote:
Hello!
I recently received an Arabic translation for my application
JustLooking,
and have started looking at how to integrate the strings I was
given.
Unfortunately, I'm not finding much documentation or visual
indications in
apps like Interface Builder on how to enable RTL support.
...
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden