What to do, if you are planning to create a flex application that will be internationalized application with locals, and your Flex SDK doesn’t support that locals? Let’s solve it as the following.
Let’s take an example of Arabic support, the default Flex SDK doesn’t support Arabic as local so we need to add it.
Process:
If you have flex SDK or you have installed the adobe flash builder 4.x Standard or premium go to the following path.
P1 - If you run the copylocale and get the following error:
Solution:
1- Install the x32 bit version of java JRE.
2- Point to already 32bit java JRE installed. Or to JRE bundled with already installed application, if you want to keep existing x64 bit version.
do the following
Note: there is a tool bundled with Flex SDK (copylocale.exe) that provides creation the new locals. This example applied to flex SDK 4.x and above. Usage: copylocale src_locale(language_country) dst_locale(language_country) |
Let’s take an example of Arabic support, the default Flex SDK doesn’t support Arabic as local so we need to add it.
Process:
If you have flex SDK or you have installed the adobe flash builder 4.x Standard or premium go to the following path.
- You have to download Java JRE to allow the tool to run. ***Very important…..
- For flex SDK, if downloaded and unzipped the SDK under folder named C:\ Adobe Flex SDK 4.1
- Go to C:\ Adobe Flex SDK 4.1\bin
- For installed adobe flash builder 4.x
- Go to C:\Program Files (x86)\Adobe\Adobe Flash Builder 4\sdks\4.1.0\bin windows x64 bit
- Go to C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.1.0\bin windows x32 bit
- Open CMD command prompt and point to the above path
- C:\Program Files (x86)\Adobe\Adobe Flash Builder 4\sdks\4.1.0\bin>
- Type the copylocale command to copy the local you want as the following
- I want to create Arabic Egyptian local.
- C:\Program Files (x86)\Adobe\Adobe Flash Builder 4\sdks\4.1.0\bin> copylocale en_US ar_EG
- You will see verbose lines for the tool until it finished and returns to the command line prompt.
- To check that your local is created, go to the following path “C:\Program Files (x86)\Adobe\Adobe Flash Builder 4\sdks\4.1.0\frameworks\locale” and you should see you created locale ar_EG.
- Congratulation you have done.
P1 - If you run the copylocale and get the following error:
>
Answer: this happened when you haven’t installed the java JRE, or installed the JRE x64 bit version.Error loading: C:\Program Files\Java\jdk1.6.0_21\jre\bin\server\jvm.dll |
Solution:
1- Install the x32 bit version of java JRE.
2- Point to already 32bit java JRE installed. Or to JRE bundled with already installed application, if you want to keep existing x64 bit version.
do the following
- Go to the “C:\Program Files (x86)\Adobe\Adobe Flash Builder 4\sdks\4.1.0\bin” and locate the following file “jvm.config”.
- Edit the file and locate the line “java.home=”
- Make it “java.home=E:/Utilities/Oracle/Middleware/JDev11gU2/jdk160_05”. For example
- Note forward “/” slash not backward “\” slash.
I have created an arabic locale using the command:
ReplyDeletecopylocale en_US ar_JO
it seems that everything went fine.. I was able to see the folder ar_JO inside the "locale" sub folder of my Flex Builder installation folder. However, whenever I use Arabic locale in my application it appears as squares... I don't see any arabic letter... any idea?
Did you configured the local in your compiler settings in your IDE?
ReplyDeletethanx
ReplyDeleteDid you configured the local in your compiler settings in your IDE?
can you tell me how?
1- Right click on ur project from project explorer.
ReplyDelete2- Select Properties.
3- From properties menu select flex compiler.
4- In additional compiler arguments put the following line "-locale en_US ar_JO"
I try it and not work fine in my ios
ReplyDeletesee picture please
http://www.aej.me/IMG_0235.PNG
and in my code
layoutDirection="rtl"
direction="rtl"
and in compiler settings
-locale en_US ar_SA
I think that iOS doesn't render Arabic correctly.
ReplyDeleteWhich version of flex SDK you use?
ReplyDeleteAdobe flah builder 4.5
ReplyDeleteflex 4.5.1
Ok try it in normal web application just one page, to see if it is iOS problem or not.
ReplyDeletefor me i have tried it in web and AIR applications and it works.
In Air application work good
ReplyDeletebut on android or iphone not all components not work
Label work good
textbox arabic character is squers