Programming Guides › Programming Guide for Java › Support Objects › IMSException › Localizing Exception Messages › Managing Custom Resource Bundles
Managing Custom Resource Bundles
You manage custom resource bundles as follows:
- Call getUserLocale() to determine the locale of the current user. This method is in the TaskInfo object that is passed to the business logical task handler context or logical attribute context.
- If you are using messages in a custom resource bundle, specify the base resource bundle name in the IMSException constructor.
- To load a message into IMSException, call addUserMessage() in the IMSException object. The parameters include the locale and the unique code of the message to add.
The names of the resource bundles must follow a particular format, as follows:
- The base resource bundle name consists of the resource family name plus the extension ".properties", for example:
LocalizedMessages.properties
- Other resource bundles consist of the base resource bundle name, an underscore, the two-character language identifier of the messages in the bundle, and the ".properties" extension. For example, a German resource bundle can be named:
LocalizedMessages_de.properties
CA IdentityMinder supports the standard two-character ISO 639 language identifiers. You can view them in the following location:
http://ftp.ics.uci.edu/pub/ietf/http/related/iso639.txt
We recommend that you store your custom resource bundles in the following location within the CA IdentityMinder EAR directory on the application server:
custom\resourceBundles
If you choose not to store your custom resource bundles in custom\resourceBundles, you must store them in the custom directory or in any directory beneath it.
Note: For more information about localization, see the Configuration Guide.
Copyright © 2013 CA.
All rights reserved.
|
|