Home

 

Add custom strings to Communities and Profiles

When customizing IBM Lotus Connections, you can add strings or modify the existing strings that are used in the product. You might want to do this when adding widgets or custom extension attributes, for example.


Lotus Connections provides a external resource bundle loader for adding and updating strings to Profiles and Communities. You can only use this mechanism when performing the following tasks:

To add custom strings, you create a zip file or jar file containing the strings and save the file in the LotusConnections-config You must then register the file in the LotusConnections-config.xml file.

For performance reasons, it is recommended that you include all the resource strings in a single bundle.

  1. Create a resource bundle .zip file or .jar file that contains the strings. For example, the following string is contained in the resources.properties file, which is zipped up in the myres.zip file.

      label.vcard.encoding.cp943c=Japanese Encoding
      

    When naming the resource bundle, the resources element must be included in the appropriate location in the .zip file folder structure. For example, if the name of the bundle is com.example.profiles.resources, your resources*.properties file must be located in a folder called /com/example/profiles/ inside the zip file.

  2. Register the file 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. Access the Lotus Connections configuration file:

    3. Network deployment:

        execfile("WAS_HOME/profiles/Dmgr01/config/bin_lc_admin/
         connectionsConfig.py")
        

    4. Check out the Lotus 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 while you make changes to them.

      • cell_name is the name of the WebSphere® Application Server cell hosting the Lotus Connections feature. This argument is required even in stand-alone deployments. This argument is also case-sensitive, so type it with care.

      For example:

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

    5. From the temporary to which you just checked out the Lotus Connections configuration files, open the LotusConnections-config.xml file in a text editor.

    6. Add the following lines of code into the <resources> element block to register the zip file:

        <localZipFile file="<file_name>.zip">
           <bundle bid="<bundle_id>" name="<bundle_name>"/>
        </localZipFile>
        

      For example:

        <resources>
          <!-- 
          Example:
          The attribute 'file' is expected to be the name of a zip file located under LotusConnections-config/ext-i18n-resources/{{file}}
          
          The attribute 'bid' must be globally unique as it identifies the bundle elsewhere in the LotusConnections-config.xml file.
           -->
           <localZipFile file="myres.zip">
           <bundle bid="myres" name="com.acme.profiles.resources"/>
          </localZipFile> 
        </resources>
        

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

    8. To check in the updated file...

        LCConfigService.checkInConfig()
        

    9. To exit the wsadmin client, type

      exit

      at the prompt.

  3. After registering the file, copy it to the following location:

      <was_profile_root>/config/cells/cell_name/LotusConnections-config/ext-i18n-resources
      

    If the ext-i18n-resources does not already exist, create it in the location specified above.


After completing the steps above, 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 and Communities (to provide widget titles and descriptions).


Change the look of Lotus Connections

 

Related tasks

Start the wsadmin client

Enable custom extension attributes for Profiles

Configure the vCard export feature for Profiles

Enable custom widgets for Communities

Enable custom widgets for Profiles


+

Search Tips   |   Advanced Search