To mxmlc we are adding
-locale=en_GB;
-compiler.source-path+=/my_proj/locale/{locale};
and there exists a path:
/my_proj/locale/en_GB/Admin.properties
Does that answer your question?
From: Edward Stangler<mailto:[email protected]>
Sent: Sunday, November 29, 2020 1:20 PM
To: [email protected]<mailto:[email protected]>
Subject: Re: RE: RE: Resource bundles and locales
What is the resource bundle format in Royale?
In Flex, you create a .swf file, like:
mxmlc -locale=%locale_name% -source-path=locale/{locale}
-include-resource-bundles=%bundles% -output %target%
where
o %target% = a .swf filename (i.e. myapp_en_US.swf)
o %bundles% = list of bundle names (previously generated on a compile of
the app using -resource-bundle-list=filename.txt)
o %locale_name% = en_US, etc.
o locale/{locale} = subdirectories (i.e. locale/en_US) that contain a
MYBUNDLE.properties file for each resource bundle (starts with UTF-8
BOM, then each line: key=value).
There is a default locale that is integrated into your app. Then you
can dynamically load different locale .swf files at a later time, in
ways like this:
resourceManager.loadResourceModule( "myapp_en_US.swf", true
).addEventListener(
mx.events.ResourceEvent.COMPLETE,
function completeHandler( event : mx.events.ResourceEvent ) : void
{
resourceManager.localeChain = ["en_US"];
}
);
In Royale, mxmlc won't allow that command-line (it insists on a source
filename). And I know a .swf isn't used in JS. And I don't know if a
default locale is integrated on the JS side.
So I have no idea where to start.
On 11/29/2020 1:35 AM, Yishay Weiss wrote:
> I haven’t tried dynamically loading locales. We are using the compiler
> option, which is the same as in Flex.
>
>
>
> From: Edward Stangler
> Sent: Friday, November 27, 2020 4:15 AM
> Subject: Re: RE: Resource bundles and locales
>
> Right, but how do you create the resource bundles and dynamically load
> the locales?
>
> It seems like it's very different in Royale.
>
>
>
> On 11/26/2020 1:58 AM, Yishay Weiss wrote:
>> In emulation components it’s similar to the Flex syntax. We have seen bugs
>> however with the @ annotator syntax in mxml and are using instead things like
>>
>> <s:Label text=”{ResourceManager.getInstance().getString(‘bundle’, ‘key’)}”/>
>>
>>
>>
>> From: Edward Stangler
>> Sent: Thursday, November 26, 2020 12:31 AM
>> Subject: Resource bundles and locales
>>
>> What is the current way to do resource bundles and locales?
>>