Localization resources for a workflow automation are contained in localization resource bundles, which are a
set of files that define key-value pairs for all the strings that are displayed. 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 workflow automation 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 your workflow automation or toolkit.
- 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.
- For each translatable string in your workflow automation, 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.
- In the editor, 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 workflow automation 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 workflow automation 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).
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.
Note: The files must meet the following requirements:
-
Zip your properties files into a single .zip file.
- To import your resource bundle into your workflow automation, open the localization resource file
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 views
or human services by going to the Variables tab.