When loading a ResourceModule for the Japanese language, we also want to
apply a set of styles to change the default font to something Japanese.
I have a solution now that loads a ja_JP_Styles.swf through StyleManager
as well as loading a ja_JP_ResourceModule.swf with ResourceManager but
would like to combine the calls.
1. I know I could forget about loading external style SWFs and put
something like
StyleManager.getStyleDeclaration("global").setStyle("fontFamily",
resourceManager.getString("FooBar", "globalFont"));
after setting localeChain, but I'm thinking we'll want to change other
styles and would like to keep a generic solution like I have now, but
cut down on the extra HTTP request. Maybe this is my only option?
2. I thought one could somehow Embed("style.css") in my Foo.properties
ResourceBundle but it doesn't seem like that is the right path.
3. Also, I read in the proposed spec
(http://opensource.adobe.com/wiki/display/flexsdk/Runtime+Localization+Specification#RuntimeLocalizationSpecification-Problem:AstylevalueinaCSSselectorcan'tcomefromaresource.)
that one might be able to do something like the following, but it barfs
so this feature probably didn't make it in.
global {
fontFamily: Resource(bundle="FooBar", key="globalFont");
}
What is the best way to do this, am I stuck with option #1 if I want to
just do one HTTP call when switching locales?
Thanks,
-R