SecurID® Governance & Lifecycle Blog

Subscribe to the official SecurID Governance & Lifecycle community blog for information about new product features, industry insights, best practices, and more.

Adding locale to VL&G with support for specific country

AvshalomIshLev
Beginner
Beginner
0 8 571

*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.)




8 Comments
SeanMiller1
Moderator Moderator
Moderator

It is recommended that you use the UI to manage custom strings through the Admin->User Interface->Files screen.  You can upload customerstrings_<locale_code>.properties files there.

 

This ensures the files are backed up as part of any database backups making deployment to other systems easier and it avoids any overwrites when upgrading patches or versions.

AvshalomIshLev
Beginner
Beginner

@Sean- You're correct for doing the actual translations. For translations, using customerstrings_ is the preferred approach, but you will also need to create the string_<locale> file as mentioned above. Unfortunately, uploading a customerstrings_<locale> file is not recognized by the system as an additional locale that you can choose (Tested on V6.9 - I haven't tried it on V7 yet)

GerardKlomp
Occasional Contributor
Occasional Contributor

If this is the case there will be a problem within v7. With JBoss 4.x as part of the platform the ear file was only deployed once and the files placed within the directory, as mentioned in the topic start, will still be available after a reboot.

 

With WildFly in the 7.0 release there will be a new deployment at each boot, so I've noticed. This means that any customization which I make in the deployment directory will be made undone at next boot (or even service stop, service start).

SeanMiller1
Moderator Moderator
Moderator

The above recommendations are ONLY true if the language is not one that ships with the product.  If the language ships, there will be a strings_<locale>.properties and you can simply import a new customerstrings_<locale>.properties with your translations or wording changes.

 

If there is no strings.properties for your locale, you will need to update and redeploy the ear as Gerard mentions once.  After that, you can continue to do any customizations needed through customerstrings_<locale>.properties without needed to redeploy anything.

UlrichSchulz
Beginner
Beginner

You can use the customizeACM.sh script in the deploy folder.

Basically puts the ear into a temp folder. Copy your custom files there, then it’ll repackage and redeploy including your custom files. Survives reboot

 

Use customizeACM.sh –c to create an archive from the current deployment. The files go into /tmp/customizeACM/aveksa.war.

Use customizeACM.sh –d to redeploy after you added your files.

The file $/archive/wildfly_deployment.properties will tell you the currently deployed version.

 

 

 

Ulrich Schulz, CISSP | Sr Presales Engineer | RSA, The Security Division of EMC

mobile: +1 (415) 275-4261 | email: ulrich.schulz@rsa.com | www.rsa.com

SabthamiS
Beginner
Beginner

Sean Miller

 

Hi All,

 

Any Idea how was can set a default locale on V7.0.? 

 

We have a form where in  the end user need to input date (Start date and  End date of a contractor) the few users the start date is getting passed in DD/MM/YY format for few user the date field is getting passed in MM/DD/YY format.Is there a way to set a constant format  date "MM/DD/YY" for all user ?

 

Is it possible to change it without changing the Language under options tab to set a common format (MM/DD/YY) to be displayed  globally for all users who are accessing the application ?

Regards,

Sabthami S

SeanMiller1
Moderator Moderator
Moderator

The default locale is based on the locale of the server machine but in general the locale is based on the client always

 

Sean Miller | Senior Manager, Software Engineering | RSA

O: (519) 954 8162

RSA Identity Governance and Lifecycle Community: https://community.rsa.com/community/products/governance-and-lifecycle

 

 

SabthamiS
Beginner
Beginner

Hi Sean,

 

Thanks for that  !

 

Is there any way to set the common date format(MM/DD/YYYY) for all the users accessing the application ?

 

Regards,

Sabthami Subramanian