9 Replies Latest reply on Aug 12, 2006 10:38 AM by yxyang

    Internationalization

    vanei

      From JBoss Portal documentation:
      "The JBoss Portal framework and architecture includes the portal container and supports a wide range of features including standard portlets, single sign-on, clustering and internationalization".
      It isn't really true. I am trying to translate JBoss Portal to Brazilian Portuguese, but there are some internationalization issues. For example:
      I can't change the title of CatalogPortlet because your title is hardcoded. In method render of class CatalogPortlet there is the following instruction: resp.setTitle("Pages").
      Another problem: in the navigation portlet, the name in menu is always the name of the page and I can't change de name of pages like "CMS Manager" or "management" to see a internationalized text.

        • 1. Re: Internationalization

          Yes. it is true.

          Internationalization is not implemented for portlet title.

          It seems that it is required to change the RenderSet classes etc to make the portlet title Internationalization.

          Any suggestion?

          yang

          • 2. Re: Internationalization

            It seems that the internationalization of the portlet title in jbossportal 2.2.1 is not implemented yet. Is this true?

            After i went through the DivDecorationRenderer.java class, it found that the Render class just display the WindowResult.title directly.

            To solve this problem, i need to do small modification on this.
            There are two ways to do this:

            (1)use resourcebundle which can be retrieved from the classloader.
            (2)use portlet preference.....when a portlet instance is created, according to the locale of the request come from to initialize a title related portlet preference.

            What is the better way? or any recommendation?

            yang

            • 3. Re: Internationalization

              Internationalization of title should happen only if you extend GenericPortlet that takes the title from the resource bundle according to the locale.

              • 4. Re: Internationalization

                julin

                why not include this feature in the jbossportal? I think this is an important feature/actually, it is a bug in current jboss portal.

                Bug and feature is difficult to define :-)

                yang

                • 5. Re: Internationalization

                  I meant that this is automatically provided by the javax.portlet.GenericPortlet implementation.

                  The portal (in particular the theme engine) itself cannot do anything about it because it does not have access to resource bundles (in the remote case).

                  • 6. Re: Internationalization

                    julien written:


                    Normally it is done at runtime if your portlet extends the GenericPortlet which contains :

                    protected String getTitle(RenderRequest request)
                    {
                    ResourceBundle bundle = getResourceBundle(request.getLocale());
                    return bundle.getString("javax.portlet.title");
                    }

                    If you produce the correct resource bundle it should work.


                    After testing, i found that the
                    getResourceBundle(request.getLocale());
                    has some problem and it can only load English resource.

                    However, if i use


                    ResourceBundle bundle = ResourceBundle.getBundle("resourceBundle",
                    request.getLocale(),getClass().getClassLoader());

                    then it works.

                    Why? For me, it seems that the Portlet configuration implemention has some bug because it cannot get the resource bundle correctly according to the resource configuration for the portlet.

                    regards
                    yang

                    • 7. Re: Internationalization

                      what version are you trying ?

                      did you give a try to latest 2.4 CR3 ? we have put a bunch of test case to test that functionnality.

                      if you find a behavior that does not respect the portlet specification, please describe it and we'll implement the corresponding test case and fix it. thanks.

                      • 8. Re: Internationalization

                        i am using jbp 2.2.1. It is for production server usage.

                        Fortunately, at least one workaround is available....

                        regards
                        yang

                        • 9. Re: Internationalization

                          the portal supporting internationalization is one thing.

                          More importantly, the portlets coming with jboss portal should have full internationalization support and pattern for internationalization. So that other users will follow the same pattern to code and share the usable portlets. Otherwise, later, even jboss portal has very good internationalization support, but there are no reusable portlets because none of them implement internationalization properly.

                          Hope jbp team will see the benifit of this. :-)

                          thanks
                          yang