Multilingual Portal Implementation with Webcenter Portal 11.1.1.8

Version 2

    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


    2.    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


         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

                  Below file  will get exported to local machine with given path

                   10.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

         4.      Out of box Choose Language Task flow


        1. Add the OOTB choose Language task flow to your Custom Resource catalog.17.png
        2. 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
        3. View the Portal and toggle between Arabic and English locales and portal will translate the text and layout as per selected language

     

              19.png

                                                           English version of translation

                  

                   20.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.