7 Replies Latest reply: Sep 2, 2012 3:41 PM by 907983 RSS

    building multilingual portal using WebCenter

    user5636757
      Hi,
      Can anyone point me to a good documentation on building multilingual portal using WebCenter? I found one for Spaces but I am developing custom portal using ADF resources. Thanks!
        • 1. Re: building multilingual portal using WebCenter
          Daniel Merchán
          Hi.

          WebCenter Portal Applications is an ADF application basically. You have to build your own multilingual solution based on:

          - Labels in Resource Bundle configured in your WebCenter Portal Application.
          - For Web Content showed in Content Presenter you have to define a WebCenter Content solution. It can be a "language" metadata to filter CMIS Queries.
          - Locale can be managed in different ways:
          - Session bean: Language should be associated to the session.
          - User LDAP preferred language: Solution based in user preference language like Spaces.
          - Browser locale: Set browser locale to your pages to set the language.

          My recommendation steps to follow in order:
          - First think in a WebCenter Content Solution for your contents and web assets.
          - Second Think "how to store your labels" internally in Resource Bundle or Override Resource Bundle that can be changed at Runtime because are stored in MDS. Or you can create an UCM View to manage literals and access them from an app bean in WebCenter Portal.
          - Think in your Java Bean that stores user "locale" and implement and strategy like Spaces. "Browser, preference or session language".

          Be careful in your "change locale" bean because SiteResources labels are cached. What's the meaning of this? You have to create an ADF Listener who "clean" in prepareModel phase SiteResources Cache.
          It's a common issue, follow A-TEAM Blog: https://blogs.oracle.com/ATEAM_WEBCENTER/entry/navigation_model_locale_dynamic_run

          Another blog Entry of A-TEAM Blog for multilanguage contents: https://blogs.oracle.com/ATEAM_WEBCENTER/entry/internationalize_webcenter_portal_content_presenter

          Regards.

          Edited by: Daniel Merchán on 17-ago-2012 7:09
          • 2. Re: building multilingual portal using WebCenter
            Maxime Carrier
            Daniel helped me a lot with languages, I can refer you to the questions I asked him, the answers and some of my personnal experience if you have more specific needs:

            Great video for multilingual portal: http://www.youtube.com/watch?v=ha6FzOkVc24

            Localization in Java: Localization in Java Class

            Localization for DB values: Model localization for DB column values


            If you want to search google for more references and tutorials, I suggest these words (globalization + localization + adf).

            Hope it will help ;)
            • 3. Re: building multilingual portal using WebCenter
              Martin Deh
              Just a note... The blog posts are from Oracle WebCenter ATEAM members, and not from AMIS.
              • 4. Re: building multilingual portal using WebCenter
                Daniel Merchán
                Yes, sorry. Corrected :)
                • 5. Re: building multilingual portal using WebCenter
                  user5636757
                  My application is not using any content repository (no static content) then it's only labels which are in resource bundles to be taken care of - let me try this.
                  Run time data (coming from DB, web services or other source) are to be taken care at source end, nothing to do at portal end, correct?
                  Also I read some where that WebCenter has 'content translator' type feature also, is that correct & works?
                  • 6. Re: building multilingual portal using WebCenter
                    user5636757
                    Thanks guys, I got it working.
                    Here is what I did so far:

                    1. In default-navigation-model.xml, I changed Value Type to Resource Bundle for Title, it created a resource bundle file called PortalBundle.properties.
                    2. I created another version of this file called PortalBundle_fr.properties for french language with french values for keys.
                    3. I made following changes in faces-config.xml file in application tag:

                    <locale-config>
                    <default-locale>en</default-locale>
                    <supported-locale>en</supported-locale>
                    <supported-locale>fr</supported-locale>
                    </locale-config>

                    <resource-bundle>
                    <base-name>com.lr.bos.java.PortalBundle</base-name>
                    <var>portalBundle</var>
                    </resource-bundle>

                    Now if I run application with 'fr' locate set in browser, I see navigation title in french language.

                    To internationalize other text on page, I changed label -
                    from: label="User Name"
                    to: label="#{portalBundle.USER_NAME}"

                    Add another key called USER_NAME in bother version of properties file.

                    That's all.

                    I am still looking at other things like:
                    1. resource bundle other than properties file.
                    2. giving option to user to change language and render page accordingly.

                    Thanks.
                    :)
                    • 7. Re: building multilingual portal using WebCenter
                      907983
                      I wrote an article for an other approach on multi language portal:
                      http://hvanhove.blogspot.be/2012/09/better-webcenter-portal-multi-language.html
                      Maybe this is more suitable.