Adding locale to VL&G with support for specific country
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
*The following post describes how to add new locales that were not shipped with the product.
VLG uses the java i18n framework to support different locales and languages. For example, the default English UI uses US English locale (en) and therefore the US date format will be displayed.As I was recently asked about having an English UI with a UK date format, I wanted to share the steps to enable it.
Please mind that you can change the locale without changing the language (locale = format of dates, numbers, etc.)
In order to change the locale, you simply need to create a file with the locale code suffix under <JBOSS_APPS>/aveksa.ear/aveksa.war/WEB-INF/classes/com/aveksa/gui/
The file to be created will follow this format: strings_<locale_code>.properties
To see a list of acceptable locales, check this link
Note that the locale consists of a base language + optional country. For example, the "en" locale is the same as "en_US" - U.S. English, while "en_GB" is used for UK english.
Here are the detailed steps to add UK locale (assuming standard installation for file paths):
/ # cd /home/oracle/jboss/server/default/deploy/aveksa.ear/aveksa.war/WEB-INF/classes/com/aveksa/gui/
gui/ # touch strings_en_GB.properties
gui/ # chown oracle.oinstall strings_en_GB.properties
No need to restart - simply click "Options" in VLG and you'll see the new locale.
NOTE: This will change the format of certain items such as date and numbers - this will NOT change the
language - for that you'll need to create a translation file (I'll try to cover that in a different guide.)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.