Localization is the process of including assets to support multiple locales. A locale is the combination of a language and a country code; for example, en_US refers to the English language as spoken in the United States, and fr_FR refers to the French language as spoken in France. To localize an application, you would provide two sets of assets, one for the en_US locale and one for the fr_FR locale.
Locales can share languages. For example, en_US and en_GB (Great Britain) are different locales and therefore use different sets of assets. In this case, both locales use the English language, but the country code indicates that they are different locales, and might therefor use different assets. For example, an application in the en_US locale might spell the word "color", whereas the word would be "colour" in the en_GB locale. Also, units of currency would be represented in dollars or pounds, depending on the locale, and the format of dates and times might also be different.
Localization goes beyond just translating Strings used in your application. It can also include any type of asset such as audio files, images, and videos. Because the meanings of colors and images can vary based on the culture, you can change the styles used by your application, in addition to the language used, based on the locale.
To localize an application, you first create properties files that define the localized assets. You must understand the properties file syntax and know what types of resources can be added to resource bundles. For more information, see Creating resources.
You then compile these properties files into the application as resource bundles, or create resource modules from the properties files and load them at run time.
Flex lets you change locales on the fly; if you compile more than one resource bundle into an application, you can toggle the resource bundle based on the locale. In addition, if you compile resource modules, you can load and unload the SWF files at run time based on the locale. You can even create new resource bundles programmatically.
How you load your resource bundles depends on how many locales your application supports. If your application supports just one or two locales, then you typically compile all the resources into the application. For more information, see Using resources.
If your application supports many locales, you will likely want to load the appropriate resources at run time rather than compile all supported resources into the application at compile time. To do this, you compile your resource bundles into resource modules. For more information, see Using resource modules.
To determine which locale your users will want to experience your application in, you can use one of the following methods: