By configuring the locale, you can change the language and country settings for custom Workbench menus and extensions, as well as reports.
You can configure Workbench to display in the following supported locales:
Locale |
ISO Language Code |
---|---|
Chinese (Simplified) |
zh_CN |
Chinese (Traditional) |
zh_TW |
Czech |
cs |
Danish |
da |
Dutch (The Netherlands) |
nl |
English (United States) |
en_US |
English (United Kingdom) |
en_UK |
English (Australia) |
en_AU |
English (Canada) |
en_CA |
French (France) |
fr |
Finnish |
fi |
German |
de |
Greek |
el |
Hungarian |
hu |
Italian |
it |
Japanese |
ja |
Korean |
ko |
Polish |
pl |
Portuguese (Portugal) |
pt_PT |
Portuguese (Brazil) |
pt_BR |
Russian |
ru |
Spanish |
es |
Swedish |
sv |
Thai |
th |
Turkish |
tr |
If your implementation supports multiple locales, you can localize your custom Workbench extensions and menus.
Workbench
provides resource property files for each locale for storing localized strings.
These files are located in %ENDECA_TOOLS_CONF%\conf\locale
(on Windows) or
$ENDECA_TOOLS_CONF/conf/locale
(on UNIX). Each
locale has a uniquely named resource property file:
Resources_
where
<locale>
.properties
is the ISO
language code. For example
<locale>
Resources_fr.properties
indicates that French values
are stored in it.
You can store localized values for the following attributes :
Values that do not change for locale (URLs or product names for example)
are specified in the single
Resources.properties
file.
You localize custom Workbench extensions by adding localized strings into the resource property file for each locale that you support..
Before you begin, add the custom
extension to the
ws-extensions.xml
. The
defaultName
, and
defaultDescription
attributes are not required if
the names and descriptions are included in the localized resource files.
<?xml version="1.0" encoding="UTF-8"?> <extensions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="extensions.xsd"> <extension id="productHome" url="http://www.example.com" /> </extensions>
Follow these steps to add localized properties to the resource property file for each locale :
Navigate to %ENDECA_TOOLS_CONF%\conf\locales\ (on Windows) or $ENDECA_TOOLS_CONF/conf/locales/ (on UNIX).
Open
Resources_
in a text editor for the locale in which you want to add localized values. For example,<locale>
.propertiesResources_en_US.properties
is the file name for English (US) values.Add the following attributes and localized strings for your custom extension. The extension ID is the same one used in the
ws_extensions.xml
file.Attribute
Value
tool.
<extension_ID>
.name =The localized display name for this extension that appears in the navigation menu and launch page in Oracle Commerce Workbench.
tool.
<extension_ID>
.description =A brief localized description of this extension that appears on the launch page in Oracle Commerce Workbench.
tool.
<extension_ID>
.icon =An absolute or relative URL to a custom image for this extension’s entry on the launch page. Relative URLs are relative to <hostname>:8006.
This attribute is only required if the icon is unique for each locale, otherwise, add this attribute to the
Resources.properties
file or specify a value for thedefaultIcon
in thews_extensions.xml
file.For example:
# Product Home Extension tool.productHome.name = Product Home Page tool.productHome.description = Start the product here.
If you customize a menu for multiple locales in Workbench, you can optionally specify localized titles for custom menu nodes in a resources property file.
Before you begin, add the custom menu
node to the ws-mainMenu.xml
. The
defaultName
attribute is not required if the name
is included in the localized resource files.
<?xml version="1.0" encoding="UTF-8"?> <mainmenu xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="mainMenu.xsd"> <menunode id="myextensions"> <menuitem id="productHome"/> </menunode> </mainmenu>
Follow these steps to add localized properties to the resource property file for each locale:
Navigate to
%ENDECA_TOOLS_CONF%\conf\locales\
(on Windows) or$ENDECA_TOOLS_CONF/conf/locales/
(on UNIX).Open
Resources_
in a text editor for the locale in which you want to add localized values. For example,<locale>
.propertiesResources_en_US.properties
is the file name for English (US) values.Add the following attributes and localized strings for your custom menu node. The menu node ID is the same one used in the
ws_mainMenu.xml
file.Attribute
Value
menu.<menunode_ID>.name =
The localized display name for this node that appears in the navigation menu and launch page. This attribute is required for all custom nodes.
menu.<menunode_ID>.description =
The localized description for this node that appears in the navigation menu and launch page. This attribute is not required.
menu.<menunode_ID>.icon =
An absolute or relative URL to a localized custom image for this menu node on the launch page. Relative URLs are relative to
<hostname>:8006
.This attribute is only required if the icon is unique for each locale, otherwise, add this attribute to the
Resources.properties
file or specify a value for thedefaultIcon
in thews_mainMenu.xm
l file.For example:
#My Extensions Tools Menu Properties menu.myextensions.name = Custom Tools menu.myextensions.description = Launch your custom tools.