61 Translating Portals Into Other Languages

This chapter describes how to translate portals into other languages. WebCenter Portal provides controls for language selection at the application, portal, and user levels.

This chapter includes the following topics:

Permissions:

To perform the tasks in this chapter, you require the portal-level permission Basic Services: Edit Page Access, Structure, and Content. Users with this permission can create and edit pages, revise page properties, add page content, and delete pages from a portal.

For more information about permissions, see Section 29.1, "About Roles and Permissions for a Portal."

61.1 About Languages in WebCenter Portal

If your portal will be viewed by users in more than one country, you can configure it to display localized content based on the user's selected language and locale. For example, if you know your page will be viewed in Italy, you can localize your page so that when Italian is selected (in browser, user preferences, portal, or application settings), text strings in the page will appear in Italian.

Additionally, locale selection applies special formatting considerations applicable to the selected locale. For example, those considerations may include whether information is typically viewed from left to right or right to left, how numbers are depicted (such as monetary information), and so on.

This section includes the following subsections:

61.1.1 Handling Different Information Types For Translation

Three main types of information are displayed in WebCenter Portal, each of which is handled differently for purposes of translation:

Each type of information is handled differently when it comes to translation:

  • UI elements include out-of-the-box translations for 28 languages and 100 different locales. If the default UI text is not suited to your company's needs or if your company needs to support additional languages, your system administrator can edit the string files containing this text.

  • User-entered metadata can be translated by your system administrator the same way that UI elements are translated, that is, by editing the string files.

  • Content added by users is generally displayed in the language used by the contributing user, though there is a way that your system administrator can display translated content using Content Presenter.

61.1.2 Display Language Precedence

The display language controls the language in which translated information is rendered in your browser.

On the Internet, browser settings normally control the display language used for the various web sites a user visits. However, WebCenter Portal provides additional controls for language selection at the application, portal, and user levels. The order of precedence for WebCenter Portal display language settings from weakest to strongest is as follows:

  • Browser setting—The language selected in the user's browser preferences. Browser documentation describes how to change this setting.

  • Application setting—The application default language configured by the system administrator. For more information, see the "Choosing a Default Display Language" section in Oracle Fusion Middleware Administering Oracle WebCenter Portal.

  • Portal default language—The language set by the portal moderator for a given portal. For more information, see Section 7.3.9, "Setting a Portal Display Language." This setting is not considered while determining the display language for Home portal.

  • User preference setting—The language that the user selects through the personal Preferences settings. For more information, see the "Choosing Your Preferred Display Language" section in Oracle Fusion Middleware Using Oracle WebCenter Portal.

  • Change Language task flow—The language that the user selects through the Change Language task flow.

  • Global language switcher (Public cookie)—The session language a public user—that is, a user who is not logged on to WebCenter Portal—can select on your portal's Welcome page. A session language is retained for the life of the cookie. If the user clears the browser cookies, the session language is also cleared.

Based on the combination of all these settings, the display language is calculated for portals before login, after login, and after logout.

Note:

There are exceptions for the above precedence when the current scope (that is, the default portal language) has been set.

61.1.3 Languages Supported Out-of-the-Box by WebCenter Portal

WebCenter Portal provides runtime translations for 28 languages and 100 different locales.

Table 61-1 lists all 28 languages available to WebCenter Portal out-of-the-box. Users can also select locales associated with particular languages. For example, a user can change the language to Arabic and, within that language group, select from 20 different locales, including Algeria, Bahrain, Djibouti, and so on.

Table 61-1 Languages Available for WebCenter Portal

A to Ge Gr to Ro Ru to T

Arabic

Greek

Russian

Brazilian Portuguese

Hebrew

Simplified Chinese

Czech

Hungarian

Slovak

Danish

Italian

Spanish

Dutch

Japanese

Swedish

English

Korean

Thai

Finnish

Norwegian

Traditional Chinese

French

Polish

Turkish

French-Canada

Portuguese

 

German

Romanian

 

Note:

The administrative tier that offers services to WebCenter Portal, including such tools as Oracle Enterprise Manager, provides a subset of the languages available to WebCenter Portal. These include:

  • English

  • Brazilian Portuguese

  • Simplified Chinese

  • Traditional Chinese

  • French

  • German

  • Italian

  • Japanese

  • Korean

  • Spanish

The Discussions feature uses the Jive application. Out-of-the-box, the Jive application bundled with WebCenter Portal supports English and Spanish. It does not support other languages listed in Table 61-1. However, Jive is open to your own translation files. For more information, refer to the Jive documentation site. This information is explicit to the Jive application user interface.

Note:

The Pagelet Producer Administration UI supports 9 administration languages and Dutch.

61.1.4 Fallback Language Mechanism

In WebCenter Portal, languages can have county-specific versions. For example the French language has the following variants: French (Belgium), French (Canada), French (Switzerland), and so on. You may want to translate your portal in all variants of a specific language. WebCenter Portal supports fallback mechanism for translations where the translations fall back to the base translation scope resource bundle file. For example, you may want to translate your portal in all variants of French (fr).

  • If the WebCenter Portal display language is set to French (Canada), which is represented by the code 'fr_CA', and you have provided translations only for 'fr', then as per the fallback mechanism the translations fall back to 'fr' from 'fr_CA'. In this case, any user-specified metadata will be rendered in the translation picked from the scope-resource-bundle_fr.xlf file.

  • If the WebCenter Portal display Language is 'fr_CA' and you have not provided any translation for 'fr', then as per the fallback mechanism the translations fall back to base scope resource bundle. In this case, user-specified metadata will be rendered in translation picked from the scope-resource-bundle.xlf file.

61.2 Configuring Language Options

To configure the language displayed in WebCenter Portal, you can select from the following available options, depending on whether you are an administrator, portal moderator, or user:

    • System administrators can configure the default language displayed in WebCenter Portal and the languages available to choose from in the WebCenter Portal UI. For more information, see the "Choosing a Default Display Language" section in Oracle Fusion Middleware Administering Oracle WebCenter Portal.

    • Portal moderators can configure the language displayed by default in their specific portals and the languages available to choose from in their portal's UI. For more information, see Section 7.3.9, "Setting a Portal Display Language."

    • Users can select a language preference that applies whenever they are logged on to WebCenter Portal. For more information, see the "Choosing Your Preferred Display Language" section in Oracle Fusion Middleware Using Oracle WebCenter Portal.

Note:

If the server on which WebCenter Portal is running does not support the character set of the language preference set in WebCenter Portal, the output information related to portals becomes garbled or displays as question marks. To work around this issue, users can change the session language or their personal language preference to English. This creates new log file information. The log file is typically located at $WCP_DOMAIN/servers/WC_Spaces/logs.

61.3 Enabling Users to Choose a Language

This section describes how to enable users to choose a language by adding a Change Language task flow to a page. It includes the following sections:

61.3.1 Adding a Change Language Task Flow to a Page

You can add the Change Language task flow to any page (in the Home portal, in a portal, or a business role page) to allow users to choose the language in which to display the UI.

To add a Change Language task flow to a page:

  1. Open the page in edit mode, as described in Section 12.4.3, "Opening a Page in the Page Editor (Composer)."

    Note:

    By default, the view switcher is set to Page editor view switcher and Composer displays the page in Design view showing the inline resource catalog.

  2. Locate the Change Language task flow in the resource catalog.

    Note:

    If the Change Language task flow is not listed in the resource catalog, you can add it to the resource catalog. For information, see Section 23.5.1, "Adding a Resource to a Resource Catalog."

  3. Click Add next to the Change Language task flow.

  4. Click Save to save your changes.

61.3.2 Setting Change Language Task Flow Properties

The Change Language task flow has associated properties, which users with sufficient privileges can access through the Component Properties dialog in Composer (Figure 61-4).

For information about the Component Properties dialog, see Section 14.3, "Modifying Components."

Figure 61-4 Change Language Task Flow - Component Properties

Description of Figure 61-4 follows
Description of "Figure 61-4 Change Language Task Flow - Component Properties"

The following sections provide information about the properties of the Change Language task flow and describe the properties on the Parameters tab:

61.3.2.1 About the Change Language Task Flow Properties

The properties on the Parameters tab of the Component Properties dialog control the default task flow content. For descriptions of the parameters on this tab, see Section 61.3.2.2, "Change Language Task Flow Parameters." For some task flows, parameters on this tab facilitate the wiring of the task flow to page parameters and page definition variables. For information about wiring pages and components, see Chapter 19, "Wiring Pages, Task Flows, Portlets, and ADF Components."

Changes to the properties on the Display Options, Style, and Content Style tabs affect the appearance and behavior of the task flow for all users. These properties are common to all task flows. For more information, see Section 14.3, "Modifying Components."

The contents of the Events tab depend on the events supported by the task flow. For more information, see Section 14.3.7, "Working with Component Contextual Events."

All properties on the Parameters and Display Options tabs provide access to an Expression Language (EL) editor, which you can use to select or specify a variable value instead of a constant value. Click the Expression Editor icon icon next to a property, then select to open the editor.

Note:

Wherever you enter EL on the generic Display Options tab in the Component Properties dialog, the entry is automatically validated. If the EL syntax is invalid, an error appears and the value is neither applied nor saved. Generic Display Options are those cataloged in Table 14-1, "Display Options Properties".

EL validation is not performed on non-generic display options.

If you need EL assistance, an application developer can provide an EL expression; see the "Expression Language Expressions" appendix in Oracle Fusion Middleware Developing Portals with Oracle WebCenter Portal and Oracle JDeveloper.

61.3.2.2 Change Language Task Flow Parameters

Table 61-2 describes the parameters that are unique to the Change Language task flow.

Table 61-2 Change Language Task Flow Parameters

Parameter Description

Global

Specifies whether the change is global or limited to the current portal.

Default: Not selected

Display Detailed List

Displays a detailed list of languages, including locales.

Default: Not selected

Persist Change to Preferences

Persists the user's language choice to the user's preferences.

Default: Not selected


61.4 Editing Strings or UI Text For a Particular Portal

This section describes how to edit a particular string or the strings for a particular portal, including how to find the resource key for a string and how to find the GUID for a portal. The section includes the following sub-sections:

61.4.1 Editing a Particular String or Portal

You might need to edit only a particular string or the strings for a particular portal. To accomplish this task, you need to find the values associated with the string or the portal. Then you need to edit the required strings in the portal-specific resource bundle. For information about editing portal-specific resource bundles, see the "Managing a Multilanguage Portal" chapter in Oracle Fusion Middleware Administering Oracle WebCenter Portal.

61.4.2 Finding the Resource Key for a String

If you want to edit a particular string, you need to know the resource key for the string so you can find it in the string files.

To find the resource key for a string:

  1. Open the page or resource in Composer. For details, see Section 21.4, "Editing a Page Template."

  2. Click the Edit icon (wrench) for the component that includes the string you want to edit.

  3. In the Component Properties dialog, click the Display Options tab.

  4. The resource key is the last part of the text in the Text box.

    For example, Figure 61-5 shows the resource key for the Announcements component. If you want to edit the string "Announcements" make note of the resource key ANNOUNCEMENTS.TITLE.

    Figure 61-5 Display Options for Announcements Component - Resource Key

    Description of Figure 61-5 follows
    Description of "Figure 61-5 Display Options for Announcements Component - Resource Key"

61.4.3 Finding the GUID for a Portal

If you want to edit the UI text for a particular portal or edit user-entered metadata, you need to find the GUID for the portal.

To find the GUID for a portal:

  1. Navigate to the portal that includes the strings you want to edit.

  2. Click the Actions menu, select About, then Portal.

  3. In the About Portal dialog, note the Internal ID value (Figure 61-6).

    Figure 61-6 GUID for a Portal

    Description of Figure 61-6 follows
    Description of "Figure 61-6 GUID for a Portal"

61.5 Presenting Translated Content Through a Content Presenter Template

To display translated content, you must create a Content Presenter template that looks up the display language and then displays content from a language-specific folder. For information about creating a Content Presenter template, see the "Creating Content Presenter Display Templates" chapter in Oracle Fusion Middleware Developing Portals with Oracle WebCenter Portal and Oracle JDeveloper.