CentraSite Developer's Guide : Customizing CentraSite : Customizing CentraSite i18n Messages : Fetching Message Key
Fetching Message Key
Pre-requisites:
To fetch a message key through the CentraSite Command Line Interface, you must have the CentraSite Administrator role.
CentraSite provides a Java tool named i18NMessageFinder.jar for this purpose.
To fetch a message key
*Run the Java tool i18NMessageFinder.jar.
The syntax is of the format:
*C:\SoftwareAG\CentraSite\utilities>CentraSiteToolbox.cmd I18NMessageFinder.jar -message <value of the message to be customized>
*C:\SoftwareAG\CentraSite\utilities>CentraSiteToolbox.cmd I18NMessageFinder.jar -file <config file> [-dump] [-locale <messages of this locale>]
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.
This process may take some time. The tool progress is reported to standard output.
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 (all in one line):
*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 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 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 I18NMessageFinder.jar -dump - locale ar -file c:\tmp\customize-config.xml
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.
Copyright © 2015- 2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback