You can add a custom string, such as a page name, a label, or help text, to
a page or a properties view. This custom string is not translated automatically. Instead, you
must use a localized resource file to display the translated string for the custom string in
Case Client.
Before you begin
Deploy the solution before you translate the customized
string. When you deploy the solution, the nls/Resources.js file
is created or modified in the IBM® Business Automation
Workflow/Solutions/solution_name folder
in the design object store or staging object store.
You can
maintain and update custom translated string resources in the design
object store or the staging object store depending on your organization's
processes for making translated strings available to your users:
- Testing, adding, and updating translated strings in a production
environment only
- If you test your translated strings only in a production environment
and you add or update the translated custom strings for a particular
language when available directly into a production environment for
quick turnaround and availability. Then you can put them directly
into the stage object store of the production environment with the
procedure described below.
- Testing, adding, and updating translated strings in a development
environment first
The recommended best practice is to treat all translated custom
string resources like other solution assets. Those assets should be
tested and maintained in a design object store in the development
environment first. Then, you move those assets to a production environment,
which means that all available translated custom string resources
are moved to the staging object store in the test environment. Finally,
you move the complete translated solution to a production environment,
which uses the design object store.
Although this procedure
takes longer for the translated strings to be available in a production
environment, it is the best way to maintain the solution definition,
the generated default language resources, and any other manually translated
custom string resources.
About this task
Default strings in pages and views are automatically
translated to supported languages. The custom strings are not translated
automatically, so you must add the translations for the custom strings
in pages and views. Custom strings that can be translated include
the following strings:
- Page titles
- Action labels and menu labels in widgets
- Title for the tabbed layout, title for the titled layout, custom
property label, and property hint in views.
The translated resources are displayed based on the browser locale
or the application language value in the Change Language
and Locale Settings window that you use for Case Client.
Procedure
To translate a custom string:
-
Using IBM Content
Navigator, browse to the
design_or_staging_object_store_name/IBM Business Automation
Workflow/Solutions/solution_name/nls
folder.
-
Download the Resources.js file.
-
Create your target locale directory in the original directory.
For example, if your target locale is French, create the
following directory: design_or_staging_object_store_name/IBM Business Automation
Workflow/Solutions/solution_name/nls/fr.
The locale values are case sensitive. Use hyphen separators instead of underscores in the
locale values. For example, specify
en-us instead of
en_us. If your solution locale is French and you want to translate the
solution to English, use locale
en.
-
Edit the downloaded Resources.js file.
Change the value for the custom string to the translated value for
your locale.
For example, change the English value for
a customized page title: "New Work": "New Work" to
a localized title: "New Work":"Nouveau Travail"
Attention: The encoding of the Resources.js file
must be set to UTF-8 or UTF-8 without BOM.
-
Make the same changes for any other customized strings
that you want to translate.
-
Add the translated Resources.js file
to the design_or_staging_object_store_name/IBM Business Automation
Workflow/Solutions/solution_name/nls/fr folder
as a document of Document class and as a major version. The document
title must be Resources.js.
-
Repeat these steps for each language you want to translate
to.
-
Redeploy the solution.
Results
When users open Case Client,
the translated values of customized resources display based on the
browser locale or the application language value in the Change
Language and Locale Settings window that you use for Case Client.