CentraSite Documentation : Working with the CentraSite Business UI : Administering the Business UI : Working with the CentraSite Business UI : Customizing CentraSite i18n Messages : Customizing i18n Messages : Fetching a Message Key
Fetching a Message Key
CentraSite provides a command line tool i18NMessageFinder that allows you to fetch the keys for one or more message texts.
The tool has an executable jar file i18NMessageFinder.jar to fetch the message keys. The input parameters are:
Parameter
Description
-message
The message for which key is to be found.
-file
Name of the configuration file containing all of the messages for which keys are to be found. For multiple messages, use a comma to separate the values.
-dump
Dumps all of the key-value pairs to be used for customization of messages. If -file parameter is specified, the key-value pairs are dumped in the given file. If -file parameter is not specified, the key-value pairs are displayed in the console.
-locale
Represents a language code of the form xx. The language code is always in lower case. The -locale parameter is used only if the -dump parameter is specified. Default value is en.
The syntax for the command is: C:\SoftwareAG\CentraSite\utilities>CentraSiteToolbox.[cmd|sh] I18NMessageFinder.jar -message <value of the message to be customized>
- Or -
C:\SoftwareAG\CentraSite\utilities>CentraSiteToolbox.[cmd|sh] I18NMessageFinder.jar -file <config file> [-dump] [-locale <messages of this locale>]
Note:  
Please make sure the combination of configuration parameters in the command syntax is valid. The invalid combinations are: -message and -file are mutually exclusive; -message and -dump are mutually exclusive.
The precedence of the configuration parameters for i18n customization is as follows:
*If you configure all of the parameters - -message, -dump and -file for customization, then the -message configuration takes precedence over the -dump and -file configurations.
*If you configure the parameters - -dump and -file for customization, then the -dump configuration takes precedence over the -file configuration.
Examples:
*Fetching message ID of a single message text
C:\SoftwareAG\CentraSite\utilities>CentraSiteToolbox.cmd I18NMessageFinder.jar -message “Welcome to CentraSite Business UI”
The script generates a single message ID for the corresponding message text in the following format:
INMBU_STR_WELCOME_PAGE_MESSAGE
*Fetching multiple message IDs of the default locale in one execution of the tool:
C:\SoftwareAG\CentraSite\utilities>CentraSiteToolbox.[cmd|sh] I18NMessageFinder.jar -dump
The script displays all of the messages that belong to the default English (en) locale in the console.
*Fetching multiple message IDs of the user-defined locale in one execution of the tool:
C:\SoftwareAG\CentraSite\utilities>CentraSiteToolbox.[cmd|sh] I18NMessageFinder.jar -dump -locale ar
The script displays all of the messages that belong to the user-defined, for example, Arabic (ar) locale, in the console.
*Fetching multiple message IDs of multiple message texts in one execution of the tool:
C:\SoftwareAG\CentraSite\utilities>CentraSiteToolbox.[cmd|sh] I18NMessageFinder.jar c:\tmp\customize-config.xml -dump - locale ar -file
Here, the parameter customize-config.xml specifies a plain-text file that contains the comma-separated message texts.
The script generates an <config file>_ results.properties file that contains a list of the message IDs. Each line of the configuration file includes a message ID and the corresponding message text.
This process may take some time. The tool progress is reported to standard output.
Copyright © 2005-2015 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback