Multilenguaje en una aplicación de WebCenter Portal

Actualización 09/09/2014: Nueva solución
Link Espanol:goo.gl/Pqcs9s
Link Inglés: goo.gl/1X3vr1

Update 09/09/2014: New solution
Spanish Link:goo.gl/Pqcs9s
English Link: goo.gl/1X3vr1

Comments

  1. Lo siento borré el comentario sin querer. Cuál es tu problema?

    ReplyDelete
  2. Hi Daniel,

    I try to use the portalBundle you create here in a java class in my webcenter portal to change the text of a af:outputText. Maybe you'll have a clue on how to add it ;)

    There is the thread on the OTN Forum: https://forums.oracle.com/forums/message.jspa?messageID=10495554#10495554

    Thanks!

    ReplyDelete
    Replies
    1. Hi Maxime.

      Sample only changes ViewRoot locale and ADFContext locale for view components.

      You have to follow some steps to a complete multilanguage configuration and how to take it from Java. In my sample faces-config.xml isn't configured any locale.

      I answered in your thread more details about it.

      I hope it help you

      Delete
    2. Hi again.

      Can you provide me a basic test case app for debug your problem?.

      Thanks.

      Delete
  3. Yes, I build one fast and send it to you :)

    Gracias

    ReplyDelete
  4. Hi again!

    Is there a easy way to send you the file (it's a 628 ko zip file).

    Thanks!

    ReplyDelete
    Replies
    1. Have you got Dropbox?.
      If you haven't i share to you my gmail

      Delete
    2. Send it to my personal GMAIL: daniel.merchan.garcia@g....

      Delete
  5. I just made one! Here it is:

    https://dl.dropbox.com/u/95819813/Language.zip

    Thanks, please let me know when you got it, it is my first use of dropbox :P

    ReplyDelete
    Replies
    1. I've got the solution.

      The problem reside in your type of Resource Bundle selected.

      There is 3 types of resouce bundle.

      - Java class
      - Properties bundle.
      - XLIFF Bundle.

      With your code you can work with Java and Properties bundles perfectly. However, to get Resource Bundle in Java from XLIFF solution you have to follow next code:

      public static String getStringFromBundle(String key, String baseName) {
      ResourceBundle resourceBundle = BundleFactory.getBundle("portal.portalBundle");
      return resourceBundle.getString(key);
      }

      I'm going to update OTN to share the solution to all.

      Regards.

      Delete
    2. In addition, i want to comment you that exists JSFUtils and ADFUtils java classes too useful (you have very old versions of them). If you want i can share my classes to you.

      Another point, in your XLF files put in header property target-locale (you have only selected source-locale).

      Delete
  6. Hi!

    It's working! Thanks for the advices! For the ADFUtils and JSFUtils, I took the first ones there were on the Net (and the most complete ones) but if you have more complete ones, I would really like to have them if you don't mind sharing them ;)

    Thanks!

    ReplyDelete
  7. Hi Daniel,

    Do you have your posts in English as well?
    I somehow tried to make out what you were explaining but then i have some more issues and need some help too on Multi Lingual Support.

    I have a html(English) page dropped as a Content presenter inside pageCustomizable layout in home.jspx of your sample project.

    When I run the page and change languages ,I could se that all the words change except for the content on my HTML editable page.

    How to change the language of the content as well??
    Can you please help me .

    ReplyDelete
    Replies
    1. Sorry Sowmya, in the future i've got planned to start writing in english. By the moment is still in spanish.

      My blog sample is only created for portal labels and for a mechanism to maintain localization (my sample is based in session localization but you can follow another strategy based in user preferred or browser language).

      Your problem is a "showing multilingual content". To achieve it you have to follow next ideas:

      - You have to create your content (web content, html files etc...) in WebCenter Content (UCM).
      - Have to think in a content type or content topology including custom metadata. For example, to provide "language" to your content. For example you can create custom metadata fields in WebCenter Content to provide additional info to your content, like language.
      - You have to store your content in each language, isn't going to be translated by a "magical process". For example if you have Spanish and English localization, you have to store two HTML files in WebCenter Content.
      - You need to configure your Content Presenters Task Flows with CMIS queries to filter content that are going to be showed. For example this CMIS queries can filter through your language metadata. For example something like "SELECT * FROM ora:t:IDC:GlobalProfile WHERE ora:p:xLanguage = ${myLocaleBean.locale}"

      I hope this help you.

      Regards.

      Delete
    2. You have a very good sample to use web content and content presenter:

      http://fusione2o.blogspot.com.es/2011/07/content-presenter-cmis-complete.html

      http://yonaweb.be/webcenter_tutorial/using_content_presenter_templates

      If you want to show only HTML Files, you don't need create Site Studio Region Definitions, only you have to provide more metadata for contents of WebCenter Content.

      Delete
    3. Hola Daniel,

      Una pregunta. Mencionas en este ejemplo que pudieses usar CMIS queries para filtrar los contenidos por lenguajes.

      Ahora, es posible crear un LOV usando CMIS para mostrar listar los diferentes lenguajes? Que el usario pueda selectionar y de ahi construir la siguiente CMIS query para mostrar en el Content Presenter?

      Saludos

      Delete
  8. Great Post, Do you have any Idea how to implement this in webcenter Spaces?

    ReplyDelete
    Replies
    1. Hi!.

      About WebCenter Spaces it brings OOTB multilanguage functionality. If you want to implement a selectOneChoice or other component for change a language in WebCenter Spaces then decompile Language Picker Task Flow and recreate your own Task Flow following same ideas.

      In addition, you have to remember WebCenter Spaces display precedence:
      1) Browser setting.
      2) Public cookie.
      3) Application setting.
      4) User preference setting.
      5) Current scope (f:view locale).

      The sample is only working with current scope locale.

      Regards.

      Delete
    2. WebCenter Spaces language display precedence is the follow list:

      1) Browser setting.
      2) Public cookie.
      3) Application setting.
      4) User preference setting.
      5) Current scope (f:view locale).

      Delete
  9. Hi Daniel,

    Thank you for this great Blogs.
    I've tried to implement your code to my projects,
    but after I tried further seems like your code makes sub menu functionality becomes error. if you create a sub menu, the menu will be missing, do you have any idea how to fix the error ?

    ReplyDelete
    Replies
    1. Hi Daniel,

      I have the same issue with this person.
      Could you please help to explain how to fix this one?

      Hi Hendra Tanto,

      It seems that we have the same situation,
      please let me know if you have some way to fix this.

      Thanks,

      Yoko

      Delete
    2. Hi.

      Apologies for delay :). Creating submenu is not displaying?.

      Something should be wrong with page template. I'll check attached project to fix it.

      Regards.

      Delete
    3. Hi Daniel,

      Have u found the problem ?
      Thanks :)

      Delete
    4. Hi Hendra.

      I'm going to check it right now. What is exactly the problem?.

      Are you creating a submenu in default-navigation-model at design time and it isn't appearing in your page?.

      Give me more details please.

      Delete
  10. Hi Daniel,

    I create the menu using default-navigation-model. The menu appears at first, but when you try to click the link in the submenu, the Menu will disappear. The same goes to the main menu, when I click the main menu, the sub menu will disappear

    ReplyDelete
    Replies
    1. Ok.
      I don't remember this issue when I write this post in PS3 version.

      I'll try to fix it for PS5 version and update the blog entry. But seems that cleaning SiteStructure cache before prepareModel now is not working properly.

      Regards.

      Delete
  11. Thank you Daniel :) will be waiting, you really really help alot :)

    ReplyDelete
    Replies
    1. By the moment is not working.

      If you can't wait for a official solution using Resource Bundle as value type you can do next trick:

      In navigation model use Literal value instead of Resource Bundle. When you are rendering your navigation model, use EL Expression to get from Resource Bundle the real title using the title as bundle key.

      I'll still working in free time to find a solution.

      Regards.

      Delete
    2. I'm near of a solution :). I expect achieve it and I will post a new blog post about this problem.

      Delete
    3. Is solved :).

      I'll post a new blog entry.

      Delete
    4. Hi Daniel, Where do you post it ? I've try to download the project but it's still doesn't works

      Delete
  12. Wow, thanks Daniel, I'll wait for your blog entry :)

    ReplyDelete

Post a Comment

Popular posts from this blog

OJET: Inter-Module communication in TypeScript Template

OJET: Build and Deploy in an Application Server

OJET: Select All options using only Checkboxset