Add custom strings for widgets and other specified scenariosYou can add custom strings or modify existing strings when performing certain tasks in IBM Connections, without having to update product resource files.
Before you begin
When adding custom strings to IBM Connections, use the wsadmin client. See Starting the wsadmin client for details.
IBM Connections provides a external resource bundle loader for adding and updating strings to Profiles, Communities, and the Home page. You can only use this mechanism when performing the following tasks:
- Add custom extension attributes to profiles
- Customize the Profiles business card
- Add custom widgets to Communities, Profiles, and the Home page
- Configure the vCard export application
- Renaming the tabs in the Home page
- Add custom themes to Communities
For any other scenarios that are not explicitly listed above, you can add custom strings by following the steps outlined in Customize product strings.
About this task
To add custom strings for the scenarios listed above, you need to create a bundle containing the strings and save it in the <customization_dir>/strings directory that is created at installation time. You must then register the file in the LotusConnections-config.xml file. For performance reasons, include all the resource strings in a single bundle.
- Create a properties file containing the strings that you want to add in the <customization_dir>/strings directory.
- To specify the name of the default properties file, use the following syntax: <resource_bundle_name>.<properties_file_name>
- To specify custom strings in multiple languages, append an underscore followed by the appropriate language code to the resource bundle name using the following syntax: <resource_bundle_name>_<language_code>.<properties_file_name>
For example, if your string bundle is called com.example.resources, you might create a file in the strings directory that looks like the following:<customization_dir>/strings/com.example.resources.properties This file contains the strings used for the default locale. When there is no specific bundle for the user's locale, the labels in this default properties file are used.
To include an English version of the strings, you might create the following file: <customization_dir>/strings/com.example.resources_en.properties
And to include a Slovakian version of the strings, you might include the following file:<customization_dir>/strings/com.example.resources_sk.properties
The following sample string is contained in the properties file.
- Register the resource bundle in the LotusConnections-config.xml file:
- Open a command window and start the wsadmin command-line tool as described in the topic, Starting the wsadmin client.
- Enter the following command to access the IBM Connections configuration file:
- Check out the IBM Connections configuration file:
LCConfigService.checkOutConfig(<working_directory>, <cell_name>) where:
- <working_directory> is the temporary working directory to which the configuration XML and XSD files are copied. The files are kept in this working directory while you make changes to them.
- <cell_name> is the name of the IBM WAS cell hosting the IBM Connections application. This argument is required. It is also case-sensitive, so type it with care.
- From the temporary directory to which you just checked out the IBM Connections configuration files, open the LotusConnections-config.xml file in a text editor.
- Add the following line of code into the <resources> element block to register the resource bundle:
<widgetBundle prefix=<bundle_prefix> name=<bundle_name> />
- <bundle_prefix> is a globally unique name that identifies the bundle. This is a string value. The bundle prefix is used to uniquely scope the keys in each bundle. The prefix must be unique across all registered widget bundles.
- <bundle_name> is the Java™ package name. This parameter takes a string value. When you name the resource bundle, the elements in the bundle name must correspond to the file name of the properties file that you created in step 1.
For example, if the strings customization directory contains the files com.example.resources.properties, com.example.resources_en.properties, and com.example.resources_sk.properties, the name of the bundle is com.example.resources.
The following sample code is used to register the com.example.resources bundle:
<resources><!-- Example: The attribute 'prefix' must be globally unique as it identifies the bundle when used in IBM Connections. --> <widgetBundle prefix="example" name="com.example.resources"/> </resources>
- Save your changes to the LotusConnections-config.xml file.
- To check in the updated file, use the following command:
- To exit the wsadmin client, type exit at the prompt.
What to do next
Note that when you specify external labels for attributes, editable attributes, or custom extension attributes, the labels are only applied to the user interface element that the configuration object represents. For example, if you apply a custom label to a business card <attribute> element, the label does not automatically apply to the same element in the advanced search page layout. For information about how to apply the label configuration to each user interface element individually, see Specify external labels for attributes.
Example: Adding custom strings
The following code shows some examples of the type of custom strings that can be added using the external resource bundle loader.
Parent topicCustomize product strings
Customize the Profiles business card
Starting the wsadmin client
Enable custom extension attributes for Profiles
Configure the vCard export application for Profiles
Configure Profiles directory search options
Enable custom widgets for Communities
Enable custom widgets for Profiles
Specify external labels for attributes
Add third-party links via the XML configuration file
Add a theme to the Communities configuration file
Install the non-English version of the SharePoint widget for Communities
April 8, 2011 10:26:07 AM
Apr 8, 2011 10:26:07 AM 1