Chapter 10. Language

10.1. Change Interface Language

The priority of the interface language setting follows this hierarchy:
  1. User's language
  2. Browser's language
  3. Portal's language
Be aware of this hierarchical order to change the language type appropriately.

10.2. Language for a user

You may set the interface language for your account alone and not for the entire Portal as follows:
  1. Open up the Start menu and click on Change Language :
  2. The Interface Language Setting window lists all available languages installed in the Portal:
    The Interface Language Setting window displayed, with English selected.
  3. Click on the desired language. The associated native word is highlighted.
  4. Click Apply to save your change. The site refreshes and displays its attributes in the selected language.

10.3. Set language for a user

There are two modes to set the interface language for a specific user.
Public Mode
The interface language is dictated by the language setting of the web browser.
If the language is set to one that the portal does not support, the language displayed is the language set at the Portal level (see above).
Private Mode
The interface language is set when registering each user.

10.4. Right To Left Support

Right to Left (RTL) languages are supported in the portal.
The Main portal screen, with the right-to-left Arabic language selected to demonstrate the support.

10.5. Multi-Language Navigation Nodes

The portal supports a multi-language environment, which allows any menu entry on the navigation to be internationalized.
Because the navigation bar is composed of nodes, the node display name must be modified to enable multi-language support. Instead of entering the display name of the node in a defined language (English, for example) a language-neutral 'resource key' is required.
This resource key is used to define the label that is shown for that node on the navigation bar, the menu and the breadcrumb.

Note

A localization feature called Extended Label Mode is available, which allows site administrators to add labels to nodes and pages in multiple supported languages. When the language of the site is changed, the nodes display the appropriate localized label.

10.6. Key Format

The resource key format is: #{key}
The resource key can contain any text that you consider appropriate to satisfy your business needs. It should, however, be human-readable and must not contain spaces.

10.7. Creating Keys

There are two ways to create a key for a node:

10.8. Creating Keys using Create Page Wizard

  1. Open the Site Editor menu and pick Add New Page.
  2. Enter a name for this new page
  3. Enter a resource key in the Display Name field.
    The Page Creation Wizard window, at Wizard Step 1, with the Home navigation node selected.
  4. Click Next. On the next screen you may define a page layout out of existing templates.
  5. Click Next to finalize the page creation with portlets for instance.

10.9. Creating Keys using Navigation Management

  1. Click on Site in the Toolbar then Edit Navigation
  2. Click on Add Node
  3. The Create/Edit node dialog appears. Enter a resource key in the Label field

Reusing Keys

You can reuse the same resource key in several nodes.

10.10. Providing translation

To provide a translation for the resource key used as page name, resource bundles must be provided within the web archive.
Property files (or XML resource bundles) must be located in: /jboss-as/server/<PROFILE>/deploy/gatein.ear/02portal.war/WEB-INF/classes/locale/navigation/portal/<PORTAL_NAME>_<LANGUAGE_CODE>.properties