Localizing custom extended properties names

If you want to display custom extended properties names for other languages besides English, you must create a resource bundle that contains the translated names of all the custom properties. This topic shows how to specify a resource bundle for the headerlogo property, which is displayed in the Adding custom extended properties topic.

Procedure

  1. Open wp_profile_root /PortalServer/wp.mobile/wp.mobile.mwp/shared/app/config/attr-descriptor.xml, and update the custom attribute with the friendly-name-resource and resource-bundle shown in the following example:
    <Attribute name="headerlogo" type="string" required="false" max-length="255" friendly-name-resource="custom.attr.headerlogo" resource-bundle="nls.customattribute">
    where
    • friendly-name-resource is the resource bundle key used to look up the translated string for the property name.
    • resource-bundle is the resource bundle containing the resource key and translated string pairs.
  2. Create an nls folder in wp_profile_root/PortalServer/wp.mobile/wp.mobile.mwp/shared/app
  3. Create properties files in the nls directory for each supported locale by suffixing the resource bundle name with the locale:
    Property file Description
    wp_profile_root/PortalServer/wp.mobile/wp.mobile.mwp/shared/app/nls/customattribute.properties This is default property file.
    wp_profile_root/PortalServer/wp.mobile/wp.mobile.mwp/shared/app/nls/customattribute_en.properties English
    wp_profile_root/PortalServer/wp.mobile/wp.mobile.mwp/shared/app/nls/customattribute_de.properties German
    Note:
    • A default properties file should be specified for all other locales that are not supported.
    • It is also necessary to add these as custom properties to the list of Resource Environment Providers that are used by WebSphere® Portal. You can do this using the WebSphere Application Server Integrated Solutions Console
  4. The properties file should contain the localized string for the attribute with the same key that you specified for the friendly-name-resource in step 1:
    Property file Localized string
    customattribute.properties custom.attr.headerlogo = Custom header logo (default)
    customattribute_en.properties custom.attr.headerlogo = Custom header logo (English)
    customattribute_de.properties custom.attr.headerlogo = Custom header logo (German)
  5. Restart the portal server using the following commands:
    AIXLinuxSolaris
    wp_profile_root/bin/stopServer.sh server_name -username WAS_admin -password WAS_admin_password_value
    wp_profile_root/bin/startServer.sh server_name
    Windows
    wp_profile_root\bin\stopServer server_name -username WAS_admin -password WAS_admin_password_value
    wp_profile_root\bin\startServer server_name

    where server_name is the name of the WebSphere Application Server instance (for example, WebSphere_Portal).




Terms of use
(C) Copyright IBM Corporation 2012. All Rights Reserved.