Presentation templates

In many cases the same presentation templates are used in all locales, with fragments of the template being varied by using one of these two options:

Localized elements can be referenced from the current site area.

By specifying name="./item" in component tags, the library name is not resolved until the item is rendered.

In other cases however, a locale will require such different presentation that an entirely different template is required. For example, to support locales with languages that read right to left, or for locales with very different branding.

These strategies can all be used together, by setting up template mappings appropriately in each localized site, and using site area elements or dot notation where appropriate.

Site area elements

Using site area elements to vary the locale presentation is used for parts of the presentation that are site specific content.

Reasons to use site area elements:

A user only has to be a site manager to edit these elements.

The site manager has the option to select different components.

If the site area is workflowed, all of the modified elements can be previewed at once.

Suitable for multiple sites per locale.

Reasons to not use site area elements:

Not a good solution for fragments of the presentation template that are under the control of the designer rather than the site manager.

Using more than 12 elements may cause scalability issues.

Using name="./item" in tags

The name="./item" parameter is used in component tags for locale specific design variations in a presentation template.

Reasons to use name="./item" in tags:

Changes can be limited to the users that manager presentation.

Scales better than using site area elements.

Reasons to not use name="./item" in tags:

Changes cannot be easily previewed.

References cannot be easily tracked.

Localized navigator components

When creating a navigator, if the Current site area or Current content options are used, you can reuse navigators across multilingual sites.

Navigators that use selected start positions cannot easily be shared across locales. To use these types of navigators, the name="./item" parameter must be used to retrieve localized components.

Another way of localizing a navigator is to use a JSP fragment to set a different context prior to rendering the navigator. The navigator would be set to use the Current site area as the starting point, and by changing the context you can manipulate this start area using code. Because the code uses a path lookup, the same JSP fragment will work in all of your localized sites.

Localized menu components

Menus that use the Current content site area option can be reused across multilingual sites.

Menus that use selected site areas cannot easily be shared across locales. To use these types of menus, the name="./item" parameter must be used to retrieve localized components.

Another way of localizing a menu is to use a JSP fragment to allow a list of site areas to be specified at render time. Because the path is the same for each locale, the same JSP fragment will work in all of your localized sites.

Localized text within common design components

If you have common design components that you want to reference localized text into, then it is recommended to write a Rendering Plugin that wraps a Java Resource Bundle, with the Resource Bundle Key name and the bundle name supplied to the plugin as arguments.

Localized site searching

Create a search collection for each locale specifying the appropriate language.

Create a content source for each site.

Create a search component for each locale library selecting the relevant search collection, or use the Search and Browse portlet.