Add custom strings for widgets and other specified scenarios 

You 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:

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.


Procedure

  1. 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.

      label.vcard.encoding.cp943c=Japanese Encoding

  2. Register the resource bundle in the LotusConnections-config.xml file:

    1. Open a command window and start the wsadmin command-line tool as described in the topic, Starting the wsadmin client.

    2. Enter the following command to access the IBM Connections configuration file:

        execfile("<$WAS_HOME>/profiles/<DMGR>/config/bin_lc_admin/connectionsConfig.py")

    3. 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.

        For example:

        LCConfigService.checkOutConfig("/temp", "foo01Cell01")

    4. 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.

    5. Add the following line of code into the <resources> element block to register the resource bundle:

        <widgetBundle prefix=<bundle_prefix> name=<bundle_name> />

        where

        • <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>

    6. Save your changes to the LotusConnections-config.xml file.

    7. To check in the updated file, use the following command:

        LCConfigService.checkInConfig()

    8. To exit the wsadmin client, type exit at the prompt.


What to do next


After completing this procedure, you can use the labels in other configuration settings or in your JavaScriptâ„¢ code. For example, you 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). You can also use the strings to rename the Updates, Widgets, and Administration tabs in the Home page.

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.


Parent topic

Customize product strings

Related concepts
Customize the Profiles business card


Related tasks


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 third-party links using JavaScript
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

});