Flash Localization Example


Localization, Internationalization, or I18N, whatever you want to call it, is just a way to separate your text from your interface so that it can be translated and/or maintained apart from your application.

There are many benefits to this, even if you never plan on having your application in multiple languages. Localization makes your program more maintainable, easier to update, and more flexible to change.

Here's how to localize your content in Flash. It's a lot easier than you might think!

First, open your strings panel:

Then, configure the settings:

Create a text field, give it an instance name, and apply an ID to it. It must be a Dynamic text field.

That's enough to get you started. The xml created will be in the same directory your swf is published to, placed within language folders.

For further reference to localization, go to:

good post this help me match to start here working example

Good lack

// for crate text press CTRL+F11 and set settings
// setting sets once then you can change xml
// that's created at same directory as fla
import fl.lang.Locale;
Locale.autoReplace = true;
// create pointer object to text
var IDS_HELLO:Object = noMovieClip.hello;
var IDS_TEST_TEXT:Object = test_text;
// use once on load xml finish
//Locale.addDelayedInstance(IDS_HELLO, "IDS_HELLO");
//Locale.addDelayedInstance(IDS_TEST_TEXT, "IDS_TEST_TEXT");
// subscribe to load xml finish
function updateText(success:Boolean):void {
var arr = Locale.stringIDArray;
for (var i = 0; i < arr.length; i++) {
this[arr[i]].text = Locale.loadString(arr[i]);
// load lang en,he,ru

// buttons
function en_select(event:Event) {
function he_select(event:Event) {

function ru_select(event:Event) {

Hello Nick, could you point me to how to make it readable: I have an XML file with references to images loaded at runtime and as an attribute there asome chunks of text. It shows and swaps in English perfectly. But as soon as I include description into an xml file itself it stop show everything.

Hey Nick,

Are you going to write an article about Flex localization? If not, maybe I will, just to keep things balanced. I'm having fun viewing our blogs as yin and yang. :)

Now I have one up at /flex-localization-example