New way of identifying message bundles

Friday, July 11, 2008 at 4:55 PM



A recent push introduced a subtle but important distinction concerning how message bundles are specified, and your apps need updating to reflect this change.

Instead of identifying message bundles using language-country combination codes, you must now specify the language code only (pt vs. pt-BR). If you need to distinguish your bundles by country (e.g. U.S. English vs. U.K. English), you can add a 'country' element to your Locale element with the appropriate country code. The article on localization has more information as well as examples.

Message bundles for app meta information such as title and description are still identified using language-country combination codes. This is a bug which should be fixed in a future update. In the meantime, you can specify two Locale elements per language as in the set below. Notice that both reference the same bundle:

<Locale lang="pt" messages="http://www.example.com/pt_ALL.xml"/>
<Locale lang="pt-BR" messages="http://www.example.com/pt_ALL.xml"/>

This will ensure that both your application text as well as its meta information are displayed correctly.