Hi Xavier,
The basics here are pretty easy - essentially, we have a static accessor,
Localization.impl, which is an instance of ILocalizationManager. Here's the
interface :
public interface ILocalizationManager
{
function getString(p_inStr:String):String;
function formatString(p_inStr: String, ...args):String;
}
The default implementation just returns the input string - essentially does
nothing. For the whiteboard, all the strings you'll need are processed by
"getString", so your formatString doesn't need to do anything.
To insert your own localization, simply make your own implementation of
ILocalizationManager, then assign it :
Localization.impl = new MyCustomLocalizationManager();
I know that this doesn't conform to the resourceBundle approach Flex uses,
but we have to live across non-Flex and Flex frameworks. Still, it should be
trivial to take a resourceBundle and build an ILocalizationManager which
draws its strings from it, if that's what you'd like to do.
hope that helps!
nigel