Multilingual Flex Interfaces

A fresh way for supporting multilingual flex interfaces:
Instead of the usual form (from an Adobe development center post):
…text=”{resourceManager.getString(‘resources’, ‘POSTDISPLAY_POST_TITLE’)}”…
The label looks more like:
…text=”{gS['POSTDISPLAY_POST_TITLE']}”…

The gS is actually a static object (i.e. hash map) that I load with all the key:value pairs of the language.
Once you declare gS as [Bindable] you can replace the object at runtime with other languages, resulting with the replacement of all the strings in the application.

Note: the compiler issues a warning that since you are using square brackets, the GUI object will not be able to detect changes in the data source. well it does..

original post from giladmanor.com

This entry was posted in Software Development. Bookmark the permalink.

Leave a Reply