Locked
2
Replies
2
0
Explorer
,
/t5/flex-discussions/rtl-and-xml/td-p/106584
Jan 26, 2009
Jan 26, 2009
Copy link to clipboard
Copied
Hello, what is the best way to use the new text component to
import the arabic language via xml into flash.
I noticed in the demo with the spinning globe that the arabic text is actually unicode, the unicode string is actually LTR, then is displayed RTL. Obviously this works nicely with wordwrap etc. Is there some sort of converter I can get to convert RTL arabic to LTR unicode?
I'm wondering also if its possible to import the Arabic font as a string from XML, and have things like the word wrap work correctly, I'm presuming here (maybe naively) that there isn't a RTL XML format and if there is flash doesn't wrap its head around it. I can't imagine writing whole paragraphs of text backwards in xml. To do this do I need to use markup code as per the bidi.xml file in the examples, where it seperates out each line for display to deal with the wrap issues.
Any insight would be great, I'm sorry if my explanations are a little newby, i'm no gun.
K.
I noticed in the demo with the spinning globe that the arabic text is actually unicode, the unicode string is actually LTR, then is displayed RTL. Obviously this works nicely with wordwrap etc. Is there some sort of converter I can get to convert RTL arabic to LTR unicode?
I'm wondering also if its possible to import the Arabic font as a string from XML, and have things like the word wrap work correctly, I'm presuming here (maybe naively) that there isn't a RTL XML format and if there is flash doesn't wrap its head around it. I can't imagine writing whole paragraphs of text backwards in xml. To do this do I need to use markup code as per the bidi.xml file in the examples, where it seperates out each line for display to deal with the wrap issues.
Any insight would be great, I'm sorry if my explanations are a little newby, i'm no gun.
K.
TOPICS
Text layout framework
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
Adobe Employee
,
Jan 28, 2009
Jan 28, 2009
It is up to the application that displays the XML as to how
it will appear to you, so I can't speak for whether it the XML will
look LTR or RTL when you view it. But the idea is that the Unicode
characters are stored in reading order. For TLF, we get the Unicode
in reading order, and then the Player converts them into "atoms"
that are ordered either RTL or LTR depending on the Unicode values.
The example in bidi.xml does have many shorter lines, but the same principle works on longer paragraph...
The example in bidi.xml does have many shorter lines, but the same principle works on longer paragraph...
Adobe Employee
,
/t5/flex-discussions/rtl-and-xml/m-p/106585#M134
Jan 28, 2009
Jan 28, 2009
Copy link to clipboard
Copied
It is up to the application that displays the XML as to how
it will appear to you, so I can't speak for whether it the XML will
look LTR or RTL when you view it. But the idea is that the Unicode
characters are stored in reading order. For TLF, we get the Unicode
in reading order, and then the Player converts them into "atoms"
that are ordered either RTL or LTR depending on the Unicode values.
The example in bidi.xml does have many shorter lines, but the same principle works on longer paragraphs as well, and TLF, using the Player, will correctly do line wrap regardless of the text direction. In order to get the column order, indents, and punctuation to look right, you will have to decide if your TextFlow and paragraph is mainly LTR or RTL and set the direction attribute appropriately.
The example in bidi.xml does have many shorter lines, but the same principle works on longer paragraphs as well, and TLF, using the Player, will correctly do line wrap regardless of the text direction. In order to get the column order, indents, and punctuation to look right, you will have to decide if your TextFlow and paragraph is mainly LTR or RTL and set the direction attribute appropriately.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Adobe Employee
,
LATEST
/t5/flex-discussions/rtl-and-xml/m-p/106586#M135
Jan 28, 2009
Jan 28, 2009
Copy link to clipboard
Copied
Also check out BabelPad:
http://www.babelstone.co.uk/Software/BabelPad.html
It has good complex script support and will convert to unicode.
It has good complex script support and will convert to unicode.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
