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.
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?
Internationalization of title should happen only if you extend GenericPortlet that takes the title from the resource bundle according to the locale.
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 :-)
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).
Normally it is done at runtime if your portlet extends the GenericPortlet which contains :
protected String getTitle(RenderRequest request)
ResourceBundle bundle = getResourceBundle(request.getLocale());
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",
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.
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.
i am using jbp 2.2.1. It is for production server usage.
Fortunately, at least one workaround is available....
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. :-)