This chapter includes the following topics:
Permissions
To perform the tasks in this chapter, you must be granted the following roles:
WebLogic Server: Admin
or Monitor
role granted through the Oracle WebLogic Server Administration Console.
WebCenter Portal: Administrator
role granted through WebCenter Portal Administration or a custom role that grants the following permission:
Basic Services: Edit Page Access, Structure, and Content permission
.
See also, Understanding Administrative Operations, Roles, and Tools.
If your portal must support different languages, 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 by users who speak Italian, you can localize your page so that when Italian is selected (in browser, user preferences, portal, or application settings), text strings in the page appear in Italian.
Additionally, locale selection applies special formatting considerations that are 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.
There are three main types of information that are displayed in WebCenter Portal:
User interface (UI) elements, like field and button labels and seeded boilerplate text
User-entered metadata, including page names, the portal name, and the portal description
Content added by users, including published text and images, documents, announcements, and discussion forum content
Each type of information is handled differently when it comes to modification:
UI elements:
Note:
UI elements include out-of-the-box translations for 28 languages and 100 different locales. You need to change this text only if the default UI text is not suited to your company's needs or if your company must support additional languages.
To change the text for your entire WebCenter Portal application (rather than just one portal), edit the strings in the override bundle, SpacesSeedDataOverrideBundle
.xlf.
To change the UI text for a particular portal, edit the strings in the portal-specific resource bundle, scope-resource-bundle.xlf
.
User-entered metadata (such as page names, the portal name, and the portal description) is saved as strings in the resource bundle for the portal. Each portal has its own resource bundle. To change the user-entered metadata, edit the strings in the portal-specific resource bundle.
Note:
Generally, the user-entered metadata you want to display in multiple languages is company-wide content or customer-facing content that likely has translations available in some form. More specific content (for example, content specific to a particular department or region) is probably necessary in only one language, and therefore does not require translation.
Content added in content publishing components can be translated, and your system administrator can display translated WebCenter Content items using Content Presenter. Content added in announcements and discussion forums is generally displayed in the language used by the contributing user.
For information about providing localized content, see the Translating Portals into Other Languages section in Building Portals with Oracle WebCenter Portal.
WebCenter Portal provides runtime translations for 28 languages and 100 different locales.
The list in Table 36-1 includes all the 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 36-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:
Administrative tier that offers services to WebCenter Portal, including 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
Discussions use WebCenter Portal's discussions server. Out-of-the-box, the discussions server application supports English and Spanish. It does not support other languages listed in Table 36-1 . However, the application is open to your own translation files. For more information, refer to the Jive documentation site. This information is explicit to the discussion server application user interface.
Note:
The Pagelet Producer Administration UI supports 9 administration languages and Dutch.
Whether you are modifying or translating UI text application-wide, UI text for a particular portal, or user-entered metadata in a portal, the process is basically the same: you just modify different files.
To modify seeded UI text application-wide, you edit the override bundle, SpacesSeedDataOverrideBundle.xlf
.
To modify or translate strings at the application level:
To translate strings of a particular portal, you edit the portal-specific resource bundle, scope-resource-bundle.xlf
. The strings that can be translated are portal display name, description, and page titles.
To translate strings for a portal:
To suit your business needs, you may want to translate only a specific string of a portal. For example, you may want to translate only the title of the Announcements task flow in a specific instance on a page in a portal.
To add translation for a specific instance of a string in a portal:
Use the WLST command exportMetadata
to export the string file. For example:
exportMetadata(application='webcenter',server='WC_Portal',toLocation='/tmp/metadata',docs='/oracle/webcenter/translations/scopedMD/PORTAL_GUID/scope-resource-bundle.xlf')
This example exports a portal-specific resource bundle for Oracle WebCenter Portal (webcenter
) deployed on WC_Portal
to the /tmp/metadata
folder. Replace PORTAL_GUID
with the GUID of the portal for which you are modifying strings. If necessary, change the server name to match your WebCenter Portal installation. You must change the toLocation
path to the location into which you want to export the string files.
For more information, see Running Oracle WebLogic Scripting Tool (WLST) Commands. See also exportMetadata in WebCenter WLST Command Reference.
Create a language/locale-specific version of the string file you want to translate.
Copy /oracle/webcenter/translations/scopedMD/
PORTAL_ GUID/scope-resource-bundle.xlf
, replacing PORTAL_GUID with the GUID of the portal. Then save the file with the required name. For example, to translate the portal-wide UI text into Catalina, name the file scope-resource-bundle_ca.xlf
.
Send the files to be translated to your translation team to edit. Translation will involve the following steps:
Open the string file in JDeveloper or a text editor.
Caution:
Make sure to correctly encode your edited file or you receive an error when you try to import the translations. Oracle recommends using Oracle JDeveloper to edit the file because it automatically encodes special characters correctly.
Find the <trans-unit>
blocks you want to modify.
Here is an example of a <trans-unit>
block from a portal-specific scope-resource-bundle.xlf
file. The SCOPEGUID
shows the internal ID of the selected portal, and the OBJECTGUID
shows the ID of the Announcements task flow.
<trans-unit id="SCOPEGUID:s7735bad2_2e7d_4d73_a360_423a64bfc111:SERVICEID:oracle.webcenter.peopleconn:OBJECTTYPE:profile:OBJECTGUID:ANNOUNCEMENTS.TITLE"> <source>Announcements</source> </trans-unit>
The OBJECTGUID
attribute (in scope-resource-bundle.xlf
) corresponds to the resource key displayed for the required string in Portal Composer. For information about resource key, see Finding the Resource Key for a String in Building Portals with Oracle
WebCenter Portal.
Translate the <source>
text in the specified <trans-unit>
block as required.
Save the file.
Use the WLST command importMetadata
to import the updated string file back into WebCenter Portal. For example:
importMetadata(application='webcenter',server='WC_Portal',fromLocation='/tmp/metadata',docs='/oracle/webcenter/translations/scopedMD/PORTAL_GUID/scope-resource-bundle.xlf')
This example imports the string file of the specified portal from the /tmp/metadata
folder to Oracle WebCenter Portal (webcenter
) deployed on the WC_Portal
managed server. Replace PORTAL_GUID
with the GUID of the portal for which you are modifying strings. If necessary, change the managed server name to match your WebCenter Portal installation. Change the fromLocation
path to the location from which you want to import the string files.
For details, see Running Oracle WebLogic Scripting Tool (WLST) Commands. See also importMetadata
in WebCenter WLST Command Reference.
Update the resource key of the desired UI element in WebCenter Portal. For example, if you want to translate the title of a specific Announcements task flow in a portal, perform the following steps:
Log on to WebCenter Portal, and open the portal page that contains the Announcements task flow in the page editor. See Opening a Page in the Page Editor in Building Portals with Oracle WebCenter Portal.
In the component toolbar, click the View Actions menu and select Display Options to open the Display Options dialog.
In the Text field, specify a new resource key in the following format:
#{o_w_f_t_TranslationsRBBean['trans-unit id']}
Where, trans-unit id
refers to the ID of the Announcements task flow in the scope-resource-bundle.xlf
file. For example, specify the following resource key:
#{o_w_f_t_TranslationsRBBean['SCOPEGUID:s7735bad2_2e7d_4d73_a360_423a64bfc111:SERVICEID:oracle.webcenter.peopleconn:OBJECTTYPE:profile:OBJECTGUID:ANNOUNCEMENTS.TITLE']}
Click OK (Figure 36-1 ).
Figure 36-1 Component Properties Dialog of the Announcements Task Flow
Restart the WC_Portal
managed server, and verify that your changes appear in WebCenter Portal.
You can add support for a new language that is not supported out-of-the-box in WebCenter Portal. To enable WebCenter Portal to support an additional language, you must translate portal strings into the new language within a resource bundle, update two language configuration files (supported-languages.xml
and faces-config.xml
), and then deploy your language updates to a custom shared library.
For information about adding support for a new language, see Using Spaces Extension Samples white paper on the Oracle WebCenter Portal White Papers and Technical Notes page on Oracle Technology Network.