I have a few different tabs in a navigator defined like this : (removed client specific domain)
<s:NavigatorContent xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:container="com.*****.shop.admin.container.*"
width="100%" height="100%"
implements="com.*****.common.container.IScreen"
xmlns:services="com.****.shop.admin.services.*"
label="Service Types">
I have resource bundles for different locales, en_US looks like this :
ServicesScreen.label=Service Types
When I try to do this, it doesn't work :
...
...
label="{resourceManager.getString('resources','ServicesScreen.label')}"
Instead of getting my resource bundle entry, I get something weird looking in my GUI like :
Shop0.ShopSkin9._ShopSkin_Group1.contentScroller.ScrollerSkin13.contentGroup.vsMain.AdminView154.SkinnableContainerSkin159.contentGroup.subNavItems.opCodeScreen
My resource bundles work in other cases, for instance labels next to form input fields, etc... The code compiles, however, and no errors are actually thrown (compile or run-time). I tried assigning the value to a variable and using that variable in the label field, however that caused a compile error.
I tried calling a setter method on creation complete of the component, but that didn't resolve the issue either.
How do I localize my tab labels, and can I do so dynamically at run-time?
Thanks for your time!
resources
is some kind of reserved word you can't use for resource bundle names. I had mystery-bug of my own once by naming my bundlecomponents
, which conflicted with a bundle of the same name that exists in the SDK. – RIAstarresources.properties
. It's really only when it comes to properties defined in the views' "constructors" so to speak – user1735181resourceManager.getString()
method you should see what is happening. – Sunil D.