Sun GlassFish Enterprise Server v3 Prelude Add-On Component Development Guide

Adding Internationalization Support

To add internationalization support for your add-on component to the Administration Console, use the i18nBundle attribute of the composition directive for your JavaServer Faces page to specify the name of the resource bundle.

For example, in the tabPage.jsf file, the composition directive specifies org.glassfish.admingui.core as the bundle name:

<!composition template="/templates/propertySheetTemplate.tpl" 
              pageTitle="TEST Sample Page Title" 
              helpText="Shows you what my page looks like"
              i18nBundle="org.glassfish.admingui.core"
              >

The bundle name specifies the package where the resource files are located.

Alternatively, you can place an event and handler like the following at the top of your page:

<!initPage 
    setResourceBundle(key="yourI18NKey" bundle="bundle.package.BundleName") 
/>

Replace the values yourI18NKey and bundle.package.BundleName with appropriate values for your component.