View Full Version : Localizing Flex Applications

04-15-2006, 06:37 AM
I found this information in the LiveDocs:

"The Flex localization feature lets you easily write localized Flex applications and access localized components. The localization feature currently supports static inclusion of localized resources and not dynamic retrieval of resources at runtime."
About the localization feature (http://livedocs.macromedia.com/labs/1/flex20beta2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001159.html)

I hope the final version of Flex will also support dynamic retrieval of language files. The process described in the LiveDocs is a little cumbersome: You have to compile different SWFs for each locale. And you have to use the command line, you can't do it inside the Flex IDE.

My idea was to have several language files but only one SWF. I'd like to be able to switch between languages during runtime without loading another SWF.

I have developed multi-language applications under Flash 8 by programming a parser class that reads the language files at runtime. The language files are XML documents, the parser creates an associative array from the XML structure. The array is a public static variable so that every part of the application can easily access the language resources.

What's your preferred method of adding multi-language support to your Flash/Flex applications?