xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark"
creationComplete="enumerateBundles()">
import mx.resources.ResourceBundle;
import mx.controls.Alert;
private function registrationComplete():void {
/* Use the ResourceManager to set localized values in ActionScript. */
Alert.show(resourceManager.getString('RegistrationForm', 'thanks'));
}
private function enumerateBundles():void {
for each (var locale:String in resourceManager.getLocales()) {
ta1.text += "****************************************\n";
ta1.text += "locale: " + locale + "\n";
ta1.text += "****************************************\n";
for each (var bundleName:String in resourceManager.getBundleNamesForLocale(locale)) {
ta1.text += " --------------------------------------\n";
ta1.text += " bundleName: " + bundleName + "\n";
var bundle:ResourceBundle =
ResourceBundle(resourceManager.getResourceBundle(locale, bundleName));
for (var key:String in bundle.content) {
ta1.text += " -" + key + ":" + bundle.content[key] + "\n";
}
}
}
}
[ResourceBundle("RegistrationForm")]
label="@Resource(key='street_address', bundle='RegistrationForm')">
label="@Resource(key='submit_button', bundle='RegistrationForm')"
click="registrationComplete()" />