Skip to main content
Participant
July 15, 2010
Question

Arabic support

  • July 15, 2010
  • 1 reply
  • 2128 views

Hi,

We have a requirement to build an application in flex with Arabic support for one of our big clients. Currently we are exploring flex but haven't found any good example on how to enable Arabic in flex. Have found some articles/posts saying that Arabic is supported in flex 4 through Text Layout Framework. Please note that in our case, arabic text is dynamic i.e. coming from a web service for example company names that are required to be shown in grid, drop down list and list box. Unfortunately we are not able to find any good example of using Arabic.

Can anyone out there guide us to any reference documents and comment if it is possible to show arabic in flex?

Your prompt response will be highly appreciated.

Thanks,

This topic has been closed for replies.

1 reply

July 15, 2010

Unfortunately I've only looked at the Label, RichText and RichEditableText components in Flex, which use FTE and TLF. My understanding is that if you use Spark components (List, DataGroup and DropDownList) you should be able to define an ItemRenderer using one of the FTE/TLF components and have Arabic displayed with the new engine. I'll test this out and see if it works, but it may take me a little while before I respond again.

This page may be of some use - it discusses layout mirroring in Flex: http://help.adobe.com/en_US/Flex/4.0/LayoutMirroring/content.html

July 15, 2010

Actually, it looks like the default item renderers for Spark data containers are using FTE/TLF. I don't know Arabic, so I'm not entirely sure these words are rendered correctly (or whether I even copied them correctly), but the item renderers are consistent with the Spark RichText component.

<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"                   xmlns:s="library://ns.adobe.com/flex/spark"                   xmlns:mx="library://ns.adobe.com/flex/mx">      <fx:Script>           <![CDATA[                import mx.collections.ArrayCollection;                                [Bindable]                public var myDP:ArrayCollection = new ArrayCollection(["الطوب", "الجبر", "الخرشوف", "السموت"]);           ]]>      </fx:Script>      <s:VGroup width="100%" fontSize="24">           <mx:TextArea width="100%" height="50" fontSize="24" text="FP9 Arabic Display: الطوب الجبر الخرشوف السموت"/>           <s:TextArea width="100%" height="50" fontSize="24" text="FP10 Arabic Display: الطوب الجبر الخرشوف السموت"/>           <s:HGroup>                     <s:DropDownList id="myDDL" prompt="Arabic" dataProvider="{myDP}"/>                <s:List id="myList" dataProvider="{myDP}"/>                <s:DataGroup id="myDG" dataProvider="{myDP}" itemRenderer="spark.skins.spark.DefaultItemRenderer">                     <s:layout>                          <s:VerticalLayout gap="1" />                     </s:layout>                </s:DataGroup>           </s:HGroup>      </s:VGroup> </s:Application>