Adobe

Adobe Flex 3 Resource Module Localization Dynamically Loaded Runtime Locales

October 24th, 2008 at 05:32pm Under Adobe+ Flex

I followed the example at  Adobe Labs written by Gordon Smith September 25, 2007 to create a basic language localization example that would load the locales dynamically at runtime.

I had some bumps in making the example work in that it did not load the language when launched. This could be due to differences in  version Gordon was using or just those nasty timing issue you get in the Flex framework. The basic issue was to add an initialization event handler to the example and the line resourceManager.localeChain=["en_US"]; in it.

However Gordon's tutorial was essential to understanding the geekish implementation of Flex dynamic localization. You have the copylocale utility program to run in the Flex sdk bin folder to set up Flex for each language. I created a windows batch file for it and included in my example. It makes it easy to add a language to Flex at a later date with a simple copy and edit.

Flex uses a separate swf for each language to load them at run time. You create these with command line steps using the mxmlc compiler and lengthy arguments. Since you have to do this everytime a language item changes, I again created some batch files to automate the process.

The completed example is located at Adobe Flex 3 Basic Locales Dynamic Runtime Localization With Resource Modules.

By Lon Hosford Add comment

Adobe Flex 3 Runtime Language Localization Embedded Locales

October 24th, 2008 at 04:13pm Under Adobe+ Flex

I started to review the Adobe Flex 3 language localization. The site I used to learn is at Adobe Labs written by Gordon Smith September 25, 2007.

My opinion is the localization implementation suffers a geekish solution. So even Gordon's super effort, you get lost in the terminology geeks have used to define the elements of localization features. So I did eventually get through to make my own examples based on Gordon's work.

This example shows how to embed the locale language in the Flex swf. This of course make the Flex swf potentially larger. However if you have a small amount of language or only a few languages, you might find this solution more expedient.

Look it over and download at Adobe Flex 3 Basic Embedded Runtime Localization Locales.

I also followed Gordon's modular version of localization. This allows loading localization data during runtime. Gordon's example has problems with Flex timing when you go to put it to work. I solved the timing issues and will post on that as well with the fixes. But also there are even more geekish aspects to get Flex even set up to do this.

By Lon Hosford Add comment

Previous Posts


Recent Blog Posts

Categories

Blogroll