AS3-LocaleManager provides basic localization support for apps. It takes care of loading/parsing resource bundle files (*.txt) and returns localized resources based on the precedence of the locales set in localeChain.

The bundle files are stored in app://locale/[locale]/[bundleName].txt and are formatted as KEY = Value followed by a line break. It’s possible to load bundles on-the-fly, what is useful if the app has many scenes/levels and several resources in the bundles.


    {locale:"de_DE", bundleName:"bundleName"},
    {locale:"de_CH", bundleName:"bundleName"}
], onComplete);

locales.addBundle("en_US", "bundleName", onComplete);

// optional complete responder
function onComplete(locale:String, bundleName:String, success:Boolean):void
    if ( success ) trace("Bundle " + locale + "/" + bundleName + " added.");
    else trace("Adding bundle " + locale + "/" + bundleName + " failed.");

// given localeChain ["de_CH","de_DE"]
trace(locales.getString("bundleName", "PRICE")); // Preis
trace(locales.getString("bundleName", "CURRENCY_SHORT")); // CHF
Localization . URL.