About this task
To
localize the resource bundles:
Procedure
- Copy the <Plug-in_id>_<name>.properties file
from the Rich Client Platform application plug-in's directory of the
application that you want to localize, and also from the Rich Client
Platform plug-in directory to the resources directory
under the extensions folder that you created.
Note: Because every Rich Client Platform application
is dependent on the Rich Client Platform plug-in, whenever you want
to localize a Rich Client Platform application, you must modify the <Plug-in_id>_<name>.properties file
of both the Rich Client Platform plug-in and the Rich Client Platform
application plug-in directories. The Rich Client Platform plug-in
directory is located in the <INSTALL_DIR>/repository/rcp/rcpclient/com.yantra.yfc.rcp_<version>.zip file.
To localize the Sterling Call Center and Sterling Store PCA bundle file,
follow the instructions provided in the example below.
- For example, if you are localizing the bundle
file of the Sterling Call Center and Sterling Store PCA, the <INSTALL_DIR>/rcp/COM/<version_no>/COM/rcpclient/<OS>/com.zip file
(where <version_no> is the release number)
will contain the Sterling Call Center and Sterling Store PCA plug-in directory
called com.yantra.pca.ycd.rcp_<version> directory.
- Extract the com.zip file
to the <extracted_files> directory of your
choice. Navigate to the following directory:
<extracted_files>/plugins/com.yantra.pca.ycd.rcp_1.0.0
Within this directory, there is a com20.jar file.
The bundle file is in the root directory of this JAR file and is called com.yantra.pca.ycd_<name>.properties.
Therefore, copy the <Plug-in_id>_<name>.properties file
from both the Sterling Call Center and Sterling Store PCA plug-in directory
as well as from the Rich Client Platform plug-in directory to the resources directory
under the extensions folder that you created.
- Rename the <Plug-in_id>_<name>.properties file
as <Plug-in_id>_<name>_<locale_name>.properties.
The <locale_name>=lang_cc, where lang refers
to language code and cc refers to the country or
region code; for example, com.yantra.pca.ycd_bundle_en_US.properties.
- Each resource bundle contains a <key>=<value> pair
where key is the resource key and value is
the literal displayed for the corresponding locale. Replace the <value> with
the translated value.
Note: By default,
Rich Client Platform localizes:
- Text on Labels
- Table Column names
- Descriptions in Combo Boxes
- Text on Buttons
- Tab Folder items
- Groups names
Rich Client Platform does not localize the
text in the text boxes and the keys used for identification, such
as ItemId or a resource key.
Following
are the sample bundle entries from the *.properties file:
Credit_Card_#=Credit Card
View_Details=View &Details
Customer_Address=Customer Address
Save=&Save
Ship_To_Address=Ship To Address
Address=Address
Close=&Close
Here, entries on the left represent
the resource key and entries on the right represent the translated
value that is displayed for each control, text, or string, based on
the user's locale.
- If you want to get the localized value for
any key, use the following method:
YRCPlatformUI.getString(String bundleKey);
It returns the localized string as
the output.
Results
Note: For information on localizing
resource bundles for PCAs, see the implementation topics specific
to your PCA.