You can change the display name of a rule project item
either when you create the item, or later.
About this task
To translate a rule project item name, you prefix it
with a percentage sign (%), create a messages file in your rule project
and then populate it with key-value pairs for each item name you want
to change.
Note: The translation of ruleset parameters and variables
in multi-locale rule projects is not supported.
Procedure
To add a percentage sign prefix and create the messages
file:
- To add a percentage sign prefix
- In the Rule Explorer, select the
rule project item.
- Right-click the item and then click .
- In the Rename Element dialog, type
a % sign at the beginning of the rule project item
name.
- Click OK.
In your
project, the new name replaces the old name and includes the % prefix.
- To create the messages file:
- In the Rule Explorer, select the
project whose items you want to translate.
- Right-click the project and then click .
- In the New File dialog, in the File
name field, type messages_<locale>.properties.
where <locale> is the Java™ representation for your target locale.
You can define the target locale by language or country. For example, fr (French)
or fr_FR (France), zh (Chinese)
or zh_CH (China or Simplified Chinese).
For example: messages_fr_FR.properties.
- For each rule project item that you want to translate,
enter a line in the messages file in the following format: <key>=<value>.
Where <key> is the current rule project
item name that is prefixed with the % sign, and <value> is
the translated version of it.
For example:
You
can list the items in any order. You do not have to reflect the different
levels in the hierarchy.
- Save the messages file.
The name of each
artifact in your project changes to the new value. Only those artifact
names that are prefixed with % are changed.
Note: You
can see the new values in the Rule
Designer specific
views such as the Rule Explorer or the ruleflow editor. In generic
Eclipse views such as the Problems view or the Project Explorer view,
the artifacts are still displayed with the original name prefixed
with the % sign.