Skip to Main Content

Application Development Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Multilingual Portal Implementation with Webcenter Portal 11.1.1.8

Namit Kakkar-OracleOct 6 2014 — edited Oct 7 2014

Localization/Globalization

One of the very important and useful features of WebCenter Portal PS7 is ability to provide OOTB Multilingual portals. Using WebCenter portal configuration, localization can be achieved and content on the screen can be translated and displayed based on user’s locale or selected language at run time. In addition, the OOTB localization handles the text formatting and how text is rendered on the page. For example, Arabic text runs right to left and English text runs left to right without the need for code.

Data elements displayed in WebCenter Portal can be classified as:

  • User interface (UI) elements such as field, button labels, and seeded text
  • User-provided metadata, including page names, portal name, and the portal description
  • Content added by users.

UI Interface:

  • For changing text of entire WebCenter Portal application (rather than just one portal), need to change the strings in the override bundle, SpacesSeedDataOverrideBundle.xlf.
  • For changing UI text for a particular portal, need to change the strings in the portal-specific resource bundle, scope-resource-bundle.xlf.

User entered metadata:

  • For changing user entered metadata, edit the strings in the portal-specific resource bundle.

Content

  • Content added by the user is generally displayed in the language that user used while contributing the data.

This document focuses on user provided metadata and implementing Localization and Globalization for it.

This document is useful for Developers, Technical Leads and Technical Architects, as they need to take a decision to use OOTB localization and language support in WebCenter portal and also help developers to know the step by step procedure to implement and configure the localization in WebCenter Portal.

This article provides a step by step guide to implement localization in WebCenter Portal 11.1.1.8.3 (PS7).

Use Case

Business need to create a portal that supports multiple locales and languages. Provide option to select different languages and option to toggle between them. Once user chooses a locale, the portal should render changes specific to selected locale with corresponding formatting and layout.

Supported Languages in WebCenter Portal

Web Center portal comes with run time translations for 28 language and 100 locales. For example, a user can choose the Arabic language and within that language group, select from 20 different locales, including Algeria, Bahrain etc.

Languages available for Web Center Portal

|

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

|

|

Configuration Steps

1. Create a Localization portal using WebCenter portal and add few pages in it

Login into WebCenter Portal and create a portal and few pages in it.  

1.png

2.png

3.png4.png

  1. Add support for new language
 Use WLST command to export the framework SpacesSeedDataOverrideBundle.xlf and portal specific scope-resource-bundle.xlf

 WLST commands to get connect and get the strings file in your working machines.



  a) Connect to server and execute following WLST scripts to get connected.

5.png6.png7.png

 b)     Export the string files to your working machine.



         To get the portal specific string files first step is to get the internal ID of the portal which is being used.

         Go to the overview tab of the portal and chose the internal Id of the portal.   



       ![8.png](https://objectstorage.us-phoenix-1.oraclecloud.com/p/BqK85Rn1zA5MP0vYiqbAdPgs7Z6OmMxw8SD3WCFVm5kY8uReidZ1KPIKkgJ1hCkG/n/axciphqpnohg/b/forums-legacy/o/uploads/jive_attachments/1/0/9/109954egami.png)



 c)      Use below command to export the scope-resource-bundle file and use internal Id ( as shown in above screen shot) as spaces\_GUID



           exportMetadata(application='WebCenter',server='WC\_Spaces',toLocation='C:/localWcfiles',docs='/xliffBundles/SpacesSeedDataOverrideBundle.xlf,/oracle/WebCenter/translations/scopedMD/SPACE\_GUID/scope-resource-bundle.xlf')

      _![9.png](https://objectstorage.us-phoenix-1.oraclecloud.com/p/BqK85Rn1zA5MP0vYiqbAdPgs7Z6OmMxw8SD3WCFVm5kY8uReidZ1KPIKkgJ1hCkG/n/axciphqpnohg/b/forums-legacy/o/uploads/jive_attachments/2/0/9/209954egami.png)_

          Below file  will get exported to local machine with given path

           _![10.png](https://objectstorage.us-phoenix-1.oraclecloud.com/p/BqK85Rn1zA5MP0vYiqbAdPgs7Z6OmMxw8SD3WCFVm5kY8uReidZ1KPIKkgJ1hCkG/n/axciphqpnohg/b/forums-legacy/o/uploads/jive_attachments/3/0/9/309954egami.png)_

 d) Add and modify the string files as per locales/ requirements

    Make replica of this file with the locales you want to add, say for Arabic use \_ar, for English use \_en.

11.png

Open Arabic version of the file and you will see the objects you created in the portal has the entry of Trans Unit ids and corresponding source in the xlf file. As per the locale you can change the corresponding text. Use corresponding Arabic words for the page name for Personal, Professional, Social, and Technical.

12.png

 scope-resource-bundle\_ar

13.png

 scope-resource-bundle\_en

 e)      Imports back both ‘ar’ and ‘en’ version of scope-resource-bundle.xlf files to the portal server by using the WLST commands.

                                                                                 _importMetadata(application='webcenter',server='WC\_Spaces',fromLocation='D:\\localWcfiles\\oracle\\webcenter\\translations\\scopedMD\\sfb1f9ce4\_d541\_4447\_a64a\_95430f5eb955',docs='/oracle/webcenter/translations/scopedMD/sf                     b1f9ce4\_d541\_4447\_a64a\_95430f5eb955/scope-resource-bundle.xlf')_

14.png15.png

 f)     Restart the Managed Server

 3.     **Update the resource key of the desired UI element in WebCenter Portal**
  1. Log on to WebCenter portal and go to the desired portal and corresponding page.

  2. Change the name of the pages and use the corresponding trans-unitId from the bundle files. #{o_w_f_t_TranslationsRBBean['trans-unit id']}

  3. Restart the managed server.

           ![16.png](https://objectstorage.us-phoenix-1.oraclecloud.com/p/BqK85Rn1zA5MP0vYiqbAdPgs7Z6OmMxw8SD3WCFVm5kY8uReidZ1KPIKkgJ1hCkG/n/axciphqpnohg/b/forums-legacy/o/uploads/jive_attachments/0/1/9/019954egami.png)
    
    1.  **Out of box Choose Language Task flow**
      
  4. Add the OOTB choose Language task flow to your Custom Resource catalog.17.png

  5. Drag the task flow on the Home page and customize language for this task flow instance. Say chose English and Arabic and de-selects rest of the languages.18.png

  6. View the Portal and toggle between Arabic and English locales and portal will translate the text and layout as per selected language

      ![19.png](https://objectstorage.us-phoenix-1.oraclecloud.com/p/BqK85Rn1zA5MP0vYiqbAdPgs7Z6OmMxw8SD3WCFVm5kY8uReidZ1KPIKkgJ1hCkG/n/axciphqpnohg/b/forums-legacy/o/uploads/jive_attachments/6/1/9/619954egami.png)
    
                                                   _English version of translation_
    
    
    
           _![20.png](https://objectstorage.us-phoenix-1.oraclecloud.com/p/BqK85Rn1zA5MP0vYiqbAdPgs7Z6OmMxw8SD3WCFVm5kY8uReidZ1KPIKkgJ1hCkG/n/axciphqpnohg/b/forums-legacy/o/uploads/jive_attachments/7/1/9/719954egami.png)  
    

_

                                                    _Arabic version of translations_

Summary

WebCenter portal comes with default features of localization and can help developers and technical resources to quickly configure localization in portal without any technical code. It saves the development effort and code management and is scalable to support multiple languages.

References

http://docs.oracle.com/cd/E29542_01/WebCenter.1111/e27738/wcadm_languages.htm#CJAEBJEH

Note: The author wishes to thanks Sriharsha Donthi (Middleware ADF and Webcenter Practice Manager, Oracle Consulting Services ) for his invaluable assistance and guidance in producing this article.

Comments

Post Details

Added on Oct 6 2014
0 comments
3,077 views