Text in applications that use layout mirroring should generally
read from right to left. Chrome on the text controls should lay
out with an emphasis on right to left navigation.
The Flex compiler auto-detects the direction that text should
read based on the Unicode values of the characters. When the characters
use an RTL language such as Arabic or Hebrew, TLF-based text controls
reverse the order in which they are written.
Flex adjusts the location of punctuation marks such as periods,
exclamation points, and parentheses when the direction is
set to "rtl". In addition, Flex also adjusts number separators,
paragraph breaks, and soft hyphens, as well as other non-character
entities so that their position makes sense. The algorithms for
this are described in Description of the Unicode bidirectional
algorithm.
The direction of the text itself is only reversed if the character
set contains codes that instruct the compiler to read from RTL.
All text-based controls in the Spark component set support the direction property
because they support FTE/TLF. Many text-based controls in the MX component
set support the direction property.
If your application uses text-based controls in the MX component
set such as MX Label, you must configure the compiler to use FTE,
which supports bidirectional text. Otherwise, the text will render
from LTR regardless of the character set you use. To ensure that
MX controls use FTE in Flash Builder, select the "Use Flash Text Engine
in MX Components" option. On the command line, you can apply the MXFTEText.css
theme file:
mxmlc -theme+=themes/MXFTEText.css MyApp.mxml
Selecting this option causes most internal dependencies on UITextField to
be replaced with UIFTETextField, which supports
FTE. The MX TextInput, TextArea, and RichText text classes do not
include this support. You should replace these controls with the
equivalent Spark text-based controls.
For text controls that have columns, the direction style
property also affects the column order. When direction is
set to "rtl", the first column is on the right.
The MX RichTextEditor control does not support mirroring or bidirectional
text.