8.3 NLS administration

 <  Day Day Up  >  

Certain aspects of NLS enablement can be configured via the Administration windowin WebSphere Portal. While this section will guide you through these features, bear in mind that the administration does not replace the developer's responsibility for designing and incorporating NLS enablement.

8.3.1 Portlet NLS administration

The Manage Portlets page allows you to set locale-specific titles for portlets. You cannot add support for new locales. Only locales specified by the portlet.xml deployment descriptor can be adjusted. Furthermore, you cannot change the default locale specified by the portlet.xml. To access the titles, log in as the administrator and navigate to the Manage Portlets page in the Administration window, as illustrated in Figure 8-10.

Figure 8-10. Working with portlets

graphics/08fig10.gif

Locate the portlet you want to work with and select the Modify parameters link. By default, the resulting window, shown in Figure 8-11 on page 261, will only display the Group 1 languages indicated for support by the portlet.xml. To add new languages in the administration space, you need to add that language to the file language.properties and to the language table in the Web Member Services database if you use the Member Subsystem. Then you have to insert resource bundles, with an appropriate name , in the directory located at /wp_root/shared/nls. The directory where you have to store the JSP will depend on how the portal locates your JSP for rendering its content.

Figure 8-11. Supported languages of the selected portlet

graphics/08fig11.gif

To change the title specified by the portlet.xml, select the portlet's associated radio button and select the Set title for selected locale link as shown in Figure 8-11. Enter the new title in the resulting window shown in Figure 8-12.

Figure 8-12. Setting the locale-specific title

graphics/08fig12.gif

You may have noticed that only the title can be adjusted via the Administration window.

Again, it is important to stress that by default, the administrator will only be able to set the title for Group 1 locales explicitly specified in the portlet.xml. To add support for a locale in the portlet.xml in WebSphere Studio, open the portlet.xml editor and select the concrete portlet you wish to work with. This is illustrated in Figure 8-13 on page 262.

Figure 8-13. Adding locale support to a concrete portlet

graphics/08fig13.jpg

To add a new locale, select the Add button in the locale section as shown in Figure 8-13. In the resulting dialog, you can select the locale from the drop-down list or enter the country code if you know it. This is illustrated in Figure 8-14. If the locale you choose is already defined in the portlet.xml, you will be prevented from adding it again.

Figure 8-14. Specifying a new locale

graphics/08fig14.jpg

All portlets must have a default language specified in the deployment description, otherwise the portlet cannot be installed.

8.3.2 Portal NLS administration

While it is the developer's responsibility to carefully consider the NLS support portlet applications will bring, the administrator is responsible for ensuring the Portal itself properly supports multiple languages.

Some of the basic settings for NLS enablement include setting page, theme and skin names properly, configuring or maintaining property files and incorporating support for new languages.

8.3.3 Setting NLS titles

To set locale-specific titles for a page, navigate to Administration-> Portal User Interface-> Manage Pages , then locate your page and click the Edit Page Properties icon. Display the advanced options as illustrated in Example 8-15.

Figure 8-15. Editing page properties

graphics/08fig15.gif

In the resulting window, select the Edit icon of the language for which you want to set a title and/or description. Enter the new title and/or description and select OK .

Now you will see the new title and description in the list.

If you need to enter characters that you cannot generate with your keyboard, such as Japanese characters , written accents, etc., you will need to discover the unicode values and enter them using entity references as illustrated in Figure 8-16. The four character unicode values can be found at http://www.unicode.org/ charts . The entity reference syntax is &#x 0000 ; where 0000 represents the unicode character you want to display. If you have access to the interpreted unicode character, you can copy and paste it in the text field as well.\

Figure 8-16. Using unicode values

graphics/08fig16.gif

8.3.4 Adjusting Portal resource bundles

There are several resource bundles that are used by the portal server to present locale-specific messages. Be aware that changes to a property file are not recognized until the portal is restarted. All the properties files listed below can be found in /wp_root/shared/app/nls.

  • button.properties

  • commonAdmin.properties

  • problem.properties

  • field.properties

  • engine.properties

  • CSRes.properties (not available in Enable)

  • titlebar.properties

  • registration.properties

  • LocaleNames.properties

  • pbruntime.properties

  • virtual_principals.properties

 <  Day Day Up  >  


IBM WebSphere Portal V5 A Guide for Portlet Application Development
IBM Websphere Portal V5: A Guide for Portlet Application Development
ISBN: 0738498513
EAN: 2147483647
Year: 2004
Pages: 148

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net