I have written a utility library that contains some of my most used functions. There I have a wrapper for ResourceManager.getString to simplify using the resource manager in non-UI classes:
package
{
import mx.resources.ResourceManager;
/**
* Convenience function to return a localized string
* */
[Bindable("change")]
public function _s(bundle:String, resourceName:String):String
{
return (ResourceManager.getInstance().getString(bundle, resourceName));
}
}
The problem is, that when the localeChain is changed, the function won't get called, while when invoking resourceManager.getString
everything works as expected.
Since it is just a wrapper, I can easily switch back to the "long" notation, but I'm curious how I would achieve the desired behaviour.