Internationalization support in CDF

Creating an dashboard for users in different regions can be hard in term of the message format for the local region. CDF provide internationalization support through Resource bundles that help internationalize our application.

To create resources file for i18n (there are 18 letters between the first i and the final n) we need to create a file for each locale our application supported. These files are named messages.properties, or messages_<language>.properties or messages_<language>-<country>.properties. For instance a resource bundle for Locale.UK would be messages_en-GB.properties. The <language> argument is a valid ISO Language Code. These codes are the lower-case, two-letter codes as defined by ISO-639. You can find a full list of these codes at a number of sites, such as: http://www.loc.gov/standards/iso639-2/englangn.html The <country> argument is a valid ISO Country Code. These codes are the upper-case, two-letter codes as defined by ISO-3166. You can find a full list of these codes at a number of sites, such as: http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html

Message files location in CDF

To use the internationalization support you've to use the CDF.i18n tag with the following syntax:

CDF.i18n(<message_key>)

where <message_key> is a message key that can be found in one of the message resource bundle files located as explained above.

You can find a sample of a localized dashboard in the CDF samples section.