Add custom strings for widgets and other specified scenarios
Overview
IBM Connections provides an external resource bundle loader...
- 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
- Rename the tabs in the Home page
- Add custom themes to Communities
To add custom strings for the listed tasks...
- Create a bundle containing the custom strings
- Save bundle in...
customization_dir/strings
...which is created at installation time.
- Register the file in LotusConnections-config.xml.
Add custom strings
- Create a properties file containing the strings to add in the customization_dir/strings directory.
- Specify the name of the default properties file:
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:
resource_bundle_name_language_code.properties_file_name
For example, if the string bundle is named 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.
label.vcard.encoding.cp943c=Japanese Encoding
- Register the resource bundle in LotusConnections-config.xml:
- Start wsadmin.sh and check out the Connections configuration file:
cd $DMGR_PROFILE/bin
execfile("connectionsConfig.py")
LCConfigService.checkOutConfig("/tmp", "cell_name")To get cell name...
print AdminControl.getCell()
- Edit LotusConnections-config.xml, and add the following line of code into the <resources> element block
<widgetBundle prefix=bundle_prefix name=bundle_name />
...where...
bundle_prefix Identifies and uniquely scopes the keys in each bundle. Must be unique across all registered widget bundles. This bundle prefix maps to the bundle ID reference specified when we define a custom resource attribute, Community widget, or Profile widget. bundle_name Java package name. 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
- com.example.resources_sk.properties
...the name of the bundle is...
com.example.resources
For example, to register com.example.resources:
<resources> <!-- The attribute 'prefix' must be globally unique --> <widgetBundle prefix="example" name="com.example.resources"/> </resources>
- Save changes and check in the updated file:
LCConfigService.checkInConfig()
- Type exit
What to do next
After completing this procedure, we can use the labels in other configuration settings or in the JavaScript code. For example, we can use the strings when customizing the business card in Profiles (to add labels for custom extension attributes) and adding widgets to Profiles, Communities, and the Home page (to provide widget titles and descriptions). We can also use the strings to rename the Updates, Widgets, and Administration tabs in the Home page.
Note that when we specify external labels for attributes, editable attributes, or custom extension attributes, the labels are only applied to the user interface element 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.
Parent topic:
Customize product strings
Related:
Post-migration steps for profile types and profile policies
Customize the Profiles business card
Configure the vCard export application for Profiles
Specify external labels for attributes
Create a simple profile data model and template customization
Enable custom extension attributes for Profiles
Enable custom widgets for Communities
Enable custom widgets for Profiles
Profile-types