Localization resources for a process application are contained in localization resource
bundles, which are a set of files that define key-value pairs for all the strings that are displayed
in the application. For each supported language, a file contains translated values for all of the
keys.
About this task
Tip: A localization resource bundle that
is defined and used in a human service within a process application can "hide" other resource
bundles that are defined and used in dependent toolkits if the resource bundles use the same name.
To avoid behavior inconsistencies, use unique localization resource bundle names across the
dependent toolkits and nested dependent toolkits. When the resource bundles have the same name, it
cannot be determined which resource bundle is used by the coach at run time.
Procedure
- Open Process Designer and your process application or toolkit in the Designer view.
- In the library, click the plus sign next to User Interface and select
Localization Resource.
- Provide a name for your new resource bundle and click Finish.
- Optional: If you opened the Process Designer desktop editor (deprecated), you can add each of the
language locales that you will translate your user interface into by clicking
Add and selecting each locale from the list.
- For each translatable string in your application, enter
a translation key and a default value for that key. The default value
is the value that is displayed if no translation is available.
- After you have defined all of your translation keys, you can export the resource bundle for
translation. Click Export to export the existing set of keys to a
.zip file to which you will add the corresponding translated properties files.
- If you are in the web editor, or if you did not perform
Step 4, you need to manually create a new properties file for each
language locale that you will translate your user interface into.
For each language that you want your application to support, create
a copy of the exported properties file, renaming it according to the
language that it will be supporting. For example, if your default
properties file is my_application.properties and
you want your application to support Japanese, create a copy of the
file called my_application_ja.properties.
Note: Language support also extends to specific
countries. For example, different locale options are provided for English (en_US, en_CA), French (fr
and fr_CA), and Portuguese (pt and pt_BR).
If you add a locale for a language
variant, such as British or Australian English, or Colombian Spanish, you must update the
available.locales mashup configuration property from the
WebSphere® Application
Server administration console. Make sure that you write
the values for this property in lowercase, separate the value elements with a dash (-), and separate
the values with commas, as follows:
en-gb,
en-au,
es-coFor more information about custom properties for Process Portal, see Configuring mashups custom properties for Process Portal.
The file naming scheme follows that of the Java
specification, and is as follows:
my_application_ll.properties
where
ll is the lowercase language code (
fr,
pt,
en, and so on), or
my_application_ll_CC.properties
where
ll is the lowercase language code (
fr,
pt,
en, and so on), and
CC is the uppercase country code
(
CA,
US,
BR, and so on).
- Have each of the files translated into the corresponding
languages.
- To import your resource bundle into your process application,
open the localization resource file in Process Designer and click Import.
- Browse to your updated .zip file to
select it and click Finish. If
you select to overwrite the values for all existing keys, then for
any given language, key values in the imported files that do not match
the existing key values will replace the existing values. Any new
keys are added to the existing set of keys in the existing localization
resource.
If there are any missing keys in any of the translated files, warnings are displayed. Click each
of the languages that are flagged with a warning to see which key translations are missing. If you
do not supply translations for these keys, the default value is displayed in any interfaces that
reference this key.
What to do next
After you have created your localization resources, you can associate them with your coach
views or human services by going to the
Variables tab.