Vlad
Vlad

Reputation: 2773

Abour ResourceBundle in AS3

I creadet a class that has more ResourceBundles in it. My app is multilanguage so I will need many ".properties" files.

here is a sample code

[ResourceBundle("LocalizedStrings_en_US")]
[ResourceBundle("LocalizedStrings_fr_FR")]
...
public class LocaleLoader
{
...
}

My question is if I add many ResourceBunlde lines in this class, will the file size of the main swf increase drastically or not?

Should use separata class files to load separate ResourceBundles for each language?

Upvotes: 1

Views: 807

Answers (1)

Vladimir Tsvetkov
Vladimir Tsvetkov

Reputation: 3013

The [ResourceBundle] annotation itself won't have any effect on the file size. It's the -locale compile option of the mxmlc that matters.

-locale=en_US means to embed only the US-locale in the SWF

-locale=en_US, ja_JP means to embed both the US-locale and the Japan-locale

If you don't embed the Japan-locale you can load it at runtime with resourceManager.loadResourceModule(...).

To address completely the topic of Flex Localization Support please refer to the Slides & Samples in the Flex Localization Support article I wrote in the Obecto Training Portal.

Upvotes: 3

Related Questions