Search code examples
apache-flexlocalearabic

Arabic Locale Support in Flex


Today, I learn how to localize my Flex application and to support multiple languages. The tutorials on-line are great. However, non of them mention the Arabic locale.

So basically, I created the Arabic (Jordan) locale files in the SDK folder by using:

copylocale en_US ar_JO

I navigated to the locale folder and I was able to see the ar_JO folder in there... So I assume everything went smooth.

Next, I followed the tutorials (www.babelfx.org) and was able to localize my test application in English, French, and Arabic. Clicking on any of those languages switches the labels of my simple form/into the desired language... however:

  1. When switching to the Arabic language the labels turn into empty square symbols. If you are wondering, yes I can open a notepad and type Arabic text and save it successfully.
  2. When I type Arabic text into the text boxes, I can see the Arabic words that I typed correctly (the labels are still square symbols).

Any ideas what I might be missing here??

I tried changing the font of my application (right on the application tag I set the fontFamily) into Simplified Arabic which comes by default on Windows.

Thanks


Solution

  • I found the solution. Actually, I didn't have to embed any fonts or anything in order to get it working.

    My problem was the encoding in the resources.properties file. I opened it in Notepad++, then I noticed the Encoding menu. At that time, I remembered reading something about that the encoding of the resources files should be UTF-8. So I converted the encoding to UTF-8 from the menu, compiled, it didn't work! After couple of retries and cleaning the project, it worked successfully!!!

    Just a reminder for everybody (as I have fallen into this while working this problem out): For mx components, embedded fonts must have the embedAsCFF set to false.