Customize product strings
We can replace a word or phrase in the product user interface with terminology that better suits the environment.
- We cannot use this method to customize the default notification messages in emails sent from Connections applications. See Customize notifications for information about how to customize notifications.
- We cannot use the customization debugging capability to test edited strings.
Many of the product strings in the Connections user interface are represented by key-value pairs defined in the properties files stored in the application JAR files. Before we can redefine the value of a string, we must find out which key is used to represent it. After you have identified the key-value pair to customize, we can create a properties file containing the key-value pairs corresponding to the custom strings, and copy it into the customizationDir/strings directory.
- Find the key used to represent the value of the string to customize. For a list of the application properties files containing strings we can customize, see Property file strings.
- Create a properties file to store the key-value pair for the custom string. Give the properties file the same name as the properties file used to store that key by the application. For example, if you copy the templates.properties file, and paste it into the customizationDir/strings directory, name it :
com.ibm.lconn.core.strings.templates.properties
You must create the file with the full file name; that is, it must not be a series of directories containing the templates.properties file, such as, com/ibm/lconn/core/strings/templates.properties.
Also, specify a language code for the properties file in the file name. If we do not provide a _language_code value at the end of the properties file name, the value we specify for the key in the properties file is used despite the locale of the web browser accessing the application.
For example, if you change the key with the current value of "Help" to "Ayuda" and define it in a file named com.ibm.lconn.files.strings.ui.properties (without the _es suffix), then anyone who accesses the product will see Aydua in place of the Help string even if their browser locale is not set to es. In some cases, you might want the same value applied to all languages. To change the term "IBM Connections" to a company name, for example, then you might store the customized key in a properties file without the _language_code suffix and the company name shows as-is to all browsers.
For a full list of the language codes supported by IBM Connections, see Language codes.
- Save the properties file that you created in...
customizationDir/strings
where customizationDir is the root directory for customization files. See Determining where to save the customizations for more details. Unlike some of the other areas of the product, the strings directory in the customization root does not have a subdirectory for each application. Each application uses unique properties file names so all of the strings that you replace can be stored in this common strings directory.
- Use the IBM WAS console, stop and restart each application EAR file.
- Test the changes by clearing the browser cache, and then refreshing the browser.
- To force all user web browsers to refresh all cached content and display the changes, run the command that updates the product version stamp.
- Access the Connections configuration file: execfile("connectionsConfig.py")
If we are prompted to specify a service to connect to, type 1 to select the first node in the list. Most commands can run on any node. If the command writes or reads information to or from a file by using a local file path, we must select the node where the file is stored. This information is not used by the wsadmin client when we are making configuration changes.
- Check out Connections configuration files:
LCConfigService.checkOutConfig("/tmp","cell_name")
where:
- /tmp is the temporary working directory to which configuration files are copied. The files are kept in this working directory while you edit them.
- With Windows, use a forward slash for the directory. For example: "/tmp".
- To determine: print AdminControl.getCell()
To increment the value of the versionStamp property:
LCConfigService.updateConfig("versionStamp","gmt_timestamp")
...where gmt_timestamp is the GMT time. We can specify an empty string for the time stamp or provide a GMT value string. When we specify an empty string, the client calculates the current GMT time and updates the version stamp with that value. If we choose to provide the time, specify it using the following format:
yyyyMMdd.HHmmss
...and specify the time in GMT. It is best to provide an empty string and let the client format the time stamp. For example:
LCConfigService.updateConfig("versionStamp","")
- After making changes, check the configuration files back in and we must do so during the same wsadmin session in which you checked them out for the changes to take effect. See Apply common configuration property changes for information about how to save and apply the changes.
- Property file strings
- Customize strings sourced in JavaScript
Replace a word or string in the product user interface sourced in JavaScript as opposed to a strings resource bundle.
- Add custom strings for widgets and other specified scenarios
- Customize notification strings
Customize the strings used in the notifications sent to IBM Connections users by the system.
Parent topic:
Customize the user interface
Related:
Related:
Add labels to media gallery fields
Apply common configuration property changes
Determine where to save the customizations
Related reference: