Defining user interface text in Management Center
Include text on the Management Center user interface, such as in the main work area (list, properties, or calendar views), search, explorer view, menu, message, and help text. You can customize the messages and labels that display in Management Center to make the text that display more appropriate for your own business users.
Include all message text, such as error messages, in resource properties files, which associate the files with resource keys instead of coding user interface text in definition files. This way, you maintain your user interface code in definition files and your user interface text in properties file. Message definitions then include a resource key to identify the resource bundle definition that identifies the properties file that includes the appropriate message text to use. By including all of your user interface text in properties files, you can make it easier to later update or replace text and to translate text.
Procedure
- Open HCL Commerce Developer and switch to the Enterprise Explorer view.
- Expand
- Create an extension package to extend the appropriate com.ibm.commerce.component.client.lobtools.properties package, where component is the name of the Management Center component. Name your extension package com.mycompany.commerce.component.client.lobtools.properties, where mycompany is the name of your company.
-
Within your custom
com.mycompany.commerce.component.client.lobtools.properties
package, create a properties file. Name the file with the same name as the properties file that
includes the text for the messages that you want to change. The file name should have a
.properties file extension. Create separate properties files for each language
that your site needs to support.
-
If you are adding text for a new message, open your new file for editing and add the ext for
your new messages into the file. Associate the text with a unique key in the format
key=value
. Include the key name in the definition for the message, which you must define within a definition file, to indicate the text to use.For example, the following key and text value combination sets the text for an error message in the Catalogs tool.CatalogGroup._ERR_DULPLICATE_IDENTIFIER_FOR_CHANGE=The specified code already exists. Type in a new code.
-
If you are changing or replacing the text for existing messages, copy the existing key and text
combination into your new properties file and then edit the text.
- Expand component is the name of the Management Center component. , where
- Open and review the properties file that contains the text that you want to change. Do not edit this properties file.
- Within the properties files that you are reviewing, identify and copy the key-text combination that you want to change.
- Open your new properties file for editing, and paste the key-text name combination that you copied into your new file. Edit the key-text combination to set your preferred text.
-
Create a resource bundle to define the resource bundle definition for identifying the
properties file. Include the definition name in your message definitions to indicate the properties
files that include the text for the messages.
-
Add the dependency for your custom resource bundle to any definition file that includes
definitions that reference the properties in any of your custom properties files.
- Save and publish your changes.