19.1 Understanding Translation in Oracle Portal

To use the translation feature successfully, it is important to understand how translations are created, managed, published, and queried. This section explains how translations work in Oracle Portal. It includes the following subsections:

19.1.1 Selecting a Session Language

The session language is the language in use in your current portal session. Where you select a session language depends on how your portal is set up. In some installations, you can specify a session language when you log in to your portal. You can add a language parameter to the URL, for example:

http://<host>:<port>/portal/page/<dad>/lang-<language>/<page_guid>

A URL to a French translation would look like the following:

http://mymachine.mycompany.com:5000/portal/page/mydad/lang-fr/
A47D41ECA23648A9E030007F0100118A

In all installations, you can use the Set Language portlet to select a session language and to switch between languages during the current session.

You can add the Set Language portlet to any page on which you have manage or personalization privileges. Note that the Set Language portlet displays all languages that are available in the portal, not just the languages that are enabled in the current page group.

For information about adding a portlet to a page, see Section 15.1, "Adding a Portlet to a Page". For information about the Set Language portlet, see Section A.5.5, "Working with the Set Language Portlet".

19.1.2 Displaying a Translation

The translation of an object displays automatically when the session language matches the language of the translation.

The rules for displaying translations include:

  • If the default language is selected for the user session, then no translations are displayed.

  • If a language other than the default language is selected, and a translation of an object exists for that language, then the translation is displayed.

  • If a language other than the default language is selected, and no translation exists for an object, the default language instance of the object is displayed.

These rules are illustrated in Table 19-1.

Table 19-1 Illustration of When Translations Are Displayed

Default Language Selected Language Available Translations Displayed Language

English

English

English, French, German

English

English

French

English, French, German

French

English

French

English, German

English


The same rules apply to searches that use the built-in Oracle Portal search feature: Search results include only content that has been translated into the current session language. Oracle Ultra Search behaves differently: It returns content only in the portal's default language.

19.1.3 Translation and Attributes

When an item is translated, some of its attribute values can be translated and some cannot. This section lists and describes portal objects and their translatable attributes and discusses the rules surrounding attributes and translations. It includes the following subsections:

19.1.3.1 Translatable Attributes

In addition to the translated content that you provide, some of the attributes associated with the object are also translatable. Table 19-2 lists portal objects and their translatable attributes.

Table 19-2 Portal Objects and Their Translatable Attributes

Objects Translatable Attributes Comments
  • Pages

  • Tabs

  • Regions

  • Templates

  • Navigation pages

  • Display Name

  • Description

  • Portlet Display Name

  • Contact E-Mail

  • Keywords

  • translatable custom attributes

Different images can also be provided for different languages

  • Items

  • Text

  • File

  • Image

  • Image Alignment

  • PL/SQL Code

  • Display Name

  • Description

  • Keywords

  • Author

  • translatable custom attributes

The same value that is supplied for non-translatable attributes apply to all translations of the attribute.

Although you cannot select a different category or different perspectives for a nondefault language version of an item, you can provide translations for categories and perspectives such that, when the nondefault language is selected, the translated versions of categories and perspectives display.

For more information on non-translatable attributes, see Section 19.1.3.2, "Non-Translatable Attributes"

  • Custom Page Types

  • Custom Item Types

  • Default attribute values

  • Display Name

  • Description

  • Icon

  • Procedure Link Text

  • Procedure Icon

Default attribute values are translated automatically. When users provide their own values instead of defaults, they must also provide their own translations for those values.

  • Categories

  • Perspectives

  • Display Name

  • Images

  • Attributes

  • Display Name

  • Page Groups

  • Display Name

  • Styles

  • Display Name

  • Description


More on the Oracle Technology Network

The Portal Developer Kit (PDK) provides a means for managing the storage and retrieval of strings in different languages. For more information, see the PDK page on the Oracle Technology Network:

http://www.oracle.com/technology/products/ias/portal/portlet_development_10g1014.html

19.1.3.2 Non-Translatable Attributes

Not all attributes are translatable. Across all Oracle Portal objects there are many attributes that are not translatable. This section describes the behavior of non-translatable attributes when the object has translations. To determine which attributes are translatable refer to Section 19.1.3.1, "Translatable Attributes".

When the value of a non-translatable attribute is modified, the change is copied to all language records for the current object (or version of the object).

For example, an item has the following attributes, with us standing for American English and fr standing for French (* indicates translatable attributes):

Language Display Name* Publish Date
us (default) Airline Information 24-AUG-2005 01:21 PM
fr Voyage Aériens: Informations 24-AUG-2005 01:21 PM

Display Name is translatable, and Publish Date is not translatable. When Publish Date is modified in any of the language records, the change is implicitly copied to all language records:

Language Display Name* Publish Date
us (default) Airline Information 13-SEP-2005 12:00 AM
fr Voyage Aériens: Informations 13-SEP-2005 12:00 AM

When you create a custom attribute, you can specify if it is translatable or not. In general, dynamic attributes (such as PL/SQL attributes) or attributes that use a List of Values should be made non-translatable if you do not want different values for different languages.

Some objects, like categories and perspectives, can have translatable attributes that affect the way they are viewed. But when these objects are associated with an item or a page, the associated value is not translatable. For example, for a default-language version of an item, you choose the category Business Intelligence. (Assume Category is one of the attributes selected for display in the item region.) You change the session language to French, and edit the item. Notice that the Category attribute does not display in the Edit Item wizard. So, for now, the French version of the item also displays the category Business Intelligence.

The way to address this is to provide a translation for the category itself. That is, change the session language to French, and edit the category, for example, through the Page Groups portlet. Change the category's Display Name to the French equivalent of Business Intelligence: La Business Intelligence.

Note:

For information on how to edit a category, see Section 5.3.1.2, "Editing a Category".

When the item displays in the default English session, the item's associated category is Business Intelligence. When the item displays in the French session, the item's associated category is La Business Intelligence.

19.1.3.3 Translating Attributes

Attribute values for translated objects initially default to the values specified for the default-language version of the object. Attribute values can be translated only by editing the object while the session is set to the translation language.

For example, a page is created in the default language, English (us), with the following attributes (* indicates translatable attributes):

Name Language Display Name* Keywords*
TRAVELPAGE us (default) Travel Page travel, airfare, vacation

The page designer sets the session language to French and edits the page, changing the display name to Page De Voyage. Now, two records exist for the page in the portal schema in the Oracle Metadata Repository:

Name Language Display Name* Keywords*
TRAVELPAGE us (default) Travel Page travel, airfare, vacation
TRAVELPAGE fr Page De Voyage travel, airfare, vacation

Note that the value of the Keywords attribute for the French translation has defaulted to the value of the English version. If the page designer switches back to English and edits the value of the Keywords attribute, the changes are not inherited by the translation. For example:

Name Language Display Name* Keywords*
TRAVELPAGE us (default) Travel Page travel, airfare, vacation, business expenses
TRAVELPAGE fr Page De Voyage travel, airfare, vacation

If an object is created while a language other than the default language is active, then both the translation and the default language versions are created with identical attribute values. For example, if TRAVELPAGE is created while the session language is set to French, two records with identical values (except for Language) are created in the portal schema in the Oracle Metadata Repository: one for the French translation and one for the English default-language version.

For example, in the following table, the default language is English (us) and the translation is in French (fr). The content contributor switches the session language to French, and adds Page De Voyage:

Name Language Display Name* Keywords*
TRAVELPAGE fr Page De Voyage voyage, tarifs, vacances
TRAVELPAGE us (default) Page De Voyage voyage, tarifs, vacances

The English version (that is, the default language version) is created implicitly, copying the attribute values provided for the original, French version.