Bilingual Portal in WebCenter Portal & Content Internationalization


bilingual

If you are working with a customer who has a global presence and needs to present information in more than one language in their public facing portal or website, you can rely on Internationalization capabilities of Oracle WebCenter.

Oracle WebCenter Portal supports internationalization for portal assets. However, if you integrate content from WebCenter Content, you need to implement your own solution to support more than one language. This post provides a simple approach to accomplish this goal. The solution described here uses out-of-the-box features of WebCenter Portal and Content, does not require any customization and supports bi-lingual content.

This solution will accomplish two goals:

  1. Present portal page content from WebCenter Content
  2. Switch to selected language content automatically when user switches to a different language (in the Portal)

The sample code referred here uses a portal named PortalLab and a WebCenter Content connection named WCC. It switches content between English (en) and Tamil (ta)

We are using WebCenter WIKI pages to surface content in Portal pages. WIKI pages can be edited in a Rich Text editor and stored in WebCenter Content and hence its life-cycle (workflow, revision and archiving) can be controlled from WebCenter Content. We use WebCenter Expression Language (EL) to select language specific content.

Let us assume that your Portal has several pages including an “About Us” page and “Contact Us” page.

1. Create a portal page named Content Administrator and set the page permissions to allow only Administrators to view the page. Edit the page and add a Document Viewer taskflow Save and view the page and add folders matching the name of each portal pages (for example: AboutUs, ContactUs etc…)

Create WIKI pages under each folder as below:

>AboutUs
 - content_en
 - content_ta
 >ContactUs
 - content_en
 - content_ta

View the info tab for the each of the WIKI page and note down the Identifier

Example:
 WCC#dDocName: 37001
 WCC#dDocName: 37002

2. Edit the About Us portal page (Not the Folder we created, but the Portal Page) and add a Content Presenter. Edit the Content Presenter (the white wrench icon) and enter the following properties:

Data Source: #{facesContext.externalContext.requestLocale == 'en' ? 'WCC#dDocName: 37001' : 'WCC#dDocName: 37002'}

Save the portal page.

Test by visiting the page and switching the language.

Leave a Comment

Your email address will not be published. Required fields are marked *