Type: New Feature
Affects Version/s: None
Fix Version/s: None
Component/s: IoC container
Currently it is possible to load resource bundle property files from within ActionScript via the FlexXMLApplicationContext as follows:
applicationContext.addResourceBundleLocation("url.properties", "strings", "en_US");
This is nice, since the resource bundle will be loaded before Event.COMPLETE is dispatched to the client. However, we still have to hardcode these values or pass in FlashVars to define each resource bundle location.
What would be very nice would be to be able to define all of this configuration of resource bundles within the application context XML itself:
<r:language name="en_US" file="resources.en_US.properties"/>
<r:language name="en_GB" file="resources.en_GB.properties"/>
<r:language name="fr_FR" file="resources.fr_FR.properties"/>
<r:language name="en_US" file="alternate-resources.en_US.properties"/>
These resource bundles would be automatically created and injected into the ResourceManager, so that "resourceManager.getString('strings', 'my.button.label');" would get the "my.button.label" property in the current locale from "resources..properties" and "resourceManager.getString('alternates', 'my.alternate.label');" would get the 'my.alternate.label' property from the right 'alternate-resources..properties' file.