Skip to main content
Dec 8, 2009 5:46 PM UTC
Question

RTL & LTR mixed

I'm working on a foreign language learning program primarily for teaching native english speakers arabic and/or japanese (osbit.research.pdx.edu)

Some of the exercises the client wants have rtl (arabic) and ltr (english) text mixed such as the question: "What is the appropriate English equivalent for شبة الجزيرة العربية?"


The client would like the arabic text to display rtl even though it is in the middle of a ltr paragraph.

Oh did I mention the text needs to word wrap and scroll?

I was thinking maybe I could render the text to a bitmap and manipulate it that way.

Thoughts? suggestions? is there an easy way to do this?

This topic is closed to new replies. Start a new post to keep the conversation going.

4 replies

Participant
Jan 17, 2010 2:03 AM UTC

Alright,

I have found problems working with RTL LTR mixed

If you have the text streams separated with special characters something goes wrong. Even for the same language itself. This just goes wrong as long as the TLF is set in RTL mode.

For example

هذا كلام عربي (This is English) English again

this is not supposed to be the case. the phrase English Again should come after the closing brackets.

Please  , Some body help !

Thank you

Translate
Adobe Employee
Jan 17, 2010 7:01 AM UTC

English (Latin) characters are always treated as LTR, while Arabic characters are recognised as RTL. Punctuation characters have no "natural" direction, so they get treated dependent on the direction property that is applied to the paragraph. If the paragraph is direction="ltr", punctuation is treated as left to right, if the paragraph has direction="rtl" it gets treated as right to left. Make sure the direction of the paragraph is set correctly, and this should cause the punctuation to be set correctly. If you want to override the direction applied to the punctuation, there are Unicode characters you can add to force a direction change.

Please try this, and let us know if you have further problems.

Thanks!

- robin

Translate
Participating Frequently
Dec 8, 2009 10:45 PM UTC

This is called bidirectional (or bidi) text and TLF supports it, including wrapping, scrolling, selecting, and editing it. Please let us know how it works for you; I don't think many developers have tried using it yet.

Gordon Smith

Adobe Flex SDK Team

Translate
Dec 9, 2009 10:40 PM UTC

Alright i did a find/replace to replace every <mx:Text> element with <ns:Label>, and that seems to work.

Thanks.

Translate