Fórum
plugin portlet title - internationalization problem
Archi Madhu, modificado 12 Anos atrás.
plugin portlet title - internationalization problem
Regular Member Postagens: 237 Data de Entrada: 25/03/08 Postagens Recentes
Hi All,
We are using LR6.
We are using internationalization .We have created language hooks.
I want to change PLUGIN portlet titles based on languagaes.
I have create 3 portlets in one portlet WAR file.
E01_WAR_Reportsportlet
E10_WAR_Reportsportlet
E11_WAR_Reportsportlet
I tried changing it in different ways , but it is not affecting.
1)javax.portlet.title.E01=Rapports
2)E01_WAR_Reportsportlet=Rapports
3)javax.portlet.title.E01_WAR_Reportsportlet=Rapports
It it life i can not use localization for portlets in one WAR?
Please give your thought on same.
Thanks,
Archi
We are using LR6.
We are using internationalization .We have created language hooks.
I want to change PLUGIN portlet titles based on languagaes.
I have create 3 portlets in one portlet WAR file.
E01_WAR_Reportsportlet
E10_WAR_Reportsportlet
E11_WAR_Reportsportlet
I tried changing it in different ways , but it is not affecting.
1)javax.portlet.title.E01=Rapports
2)E01_WAR_Reportsportlet=Rapports
3)javax.portlet.title.E01_WAR_Reportsportlet=Rapports
It it life i can not use localization for portlets in one WAR?
Please give your thought on same.
Thanks,
Archi
Hitoshi Ozawa, modificado 12 Anos atrás.
RE: plugin portlet title - internationalization problem
Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
As you can see from switching languages, titles of portlets included with Liferay do change between switches. If it's not changing, it's probably your program and your configurations. Just creating a properties files for languages isn't going to internationalize a program.
Archi Madhu, modificado 12 Anos atrás.
RE: plugin portlet title - internationalization problem
Regular Member Postagens: 237 Data de Entrada: 25/03/08 Postagens RecentesHitoshi Ozawa:
As you can see from switching languages, titles of portlets included with Liferay do change between switches. If it's not changing, it's probably your program and your configurations. Just creating a properties files for languages isn't going to internationalize a program.
Hi Hitoshi,
Thanks for reply.
I can see that for other plugins portlet.
Only problem with many portlets in one WAR file.
I read on wiki also that if many portlets are under same WAR file, it will not work.
Is there any solution for that?
How can I make it work for multiple portlets in one WAR?
Hitoshi Ozawa, modificado 12 Anos atrás.
RE: plugin portlet title - internationalization problem
Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens RecentesI read on wiki also that if many portlets are under same WAR file, it will not work.
Where in the wiki did you read that?
Many of Liferay's default portlets are in one war file (check under the ROOT\html\portlet).
Archi Madhu, modificado 12 Anos atrás.
RE: plugin portlet title - internationalization problem
Regular Member Postagens: 237 Data de Entrada: 25/03/08 Postagens RecentesHitoshi Ozawa:
I read on wiki also that if many portlets are under same WAR file, it will not work.
Where in the wiki did you read that?
Many of Liferay's default portlets are in one war file (check under the ROOT\html\portlet).
Wiki Link refere section Note: One WAR with multiple portlets
Thanks,
Archi
Hitoshi Ozawa, modificado 12 Anos atrás.
RE: plugin portlet title - internationalization problem
Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens RecentesWiki Link refere section Note: One WAR with multiple portlets
And the section also offers a workaround:
You can only do:
javax.portlet.title=TEST
Archi Madhu, modificado 12 Anos atrás.
RE: plugin portlet title - internationalization problem
Regular Member Postagens: 237 Data de Entrada: 25/03/08 Postagens Recentes
But we have multiple portlets in one WAR and we want each of their title to be different.
Say Reports A, Reports B, Reports C
Say Reports A, Reports B, Reports C
Julien Bonjean, modificado 12 Anos atrás.
RE: plugin portlet title - internationalization problem
Junior Member Postagens: 57 Data de Entrada: 10/06/09 Postagens Recentes
In your portlet.xml, you should have 1 entry per portlet, and you can define your language bundle for each one. You can try to define different bundle for each portlet and use javax.portlet.title property. Never tried it but seems logic.
Hashim Raza, modificado 11 Anos atrás.
RE: plugin portlet title - internationalization problem
New Member Postagens: 14 Data de Entrada: 26/06/12 Postagens Recentes
Hi Archi,
Sorry for graving this old thread, wanted to know that were you able to localize portlet title without having multiple property files?
Thanks and kind regards,
Hashim
Sorry for graving this old thread, wanted to know that were you able to localize portlet title without having multiple property files?
Thanks and kind regards,
Hashim
Hitoshi Ozawa, modificado 11 Anos atrás.
RE: plugin portlet title - internationalization problem
Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
It's possible. The question is already answered in several other threads.
Amit Doshi, modificado 11 Anos atrás.
RE: plugin portlet title - internationalization problem
Liferay Master Postagens: 550 Data de Entrada: 29/12/10 Postagens Recentes
If you are using MVC Portlet then you can do it use below code.
renderResponse.setTitle(Constants.PORTLET_TITLE) in doView method.It will set your portlet title accordingly.
And one more thing to add is , first delete that portlet from the page and then once again put that portlet into page after refreshing in order to see the changes get reflected.
And for multiple language you can use
ThemeDisplay themeDisplay = (ThemeDisplay)renderRequest.getAttribute(WebKeys.THEME_DISPLAY);
final PortletConfig portletConfig = (PortletConfig) portletRequest.getAttribute(JavaConstants.JAVAX_PORTLET_CONFIG);
String title = LanguageUtil.format(portletConfig, themeDisplay.getLocale(),
"portlet-title");
renderResponse.setTitle(title);
Hope it works.
Thanks & Regards,
Amit Doshi
renderResponse.setTitle(Constants.PORTLET_TITLE) in doView method.It will set your portlet title accordingly.
And one more thing to add is , first delete that portlet from the page and then once again put that portlet into page after refreshing in order to see the changes get reflected.
And for multiple language you can use
ThemeDisplay themeDisplay = (ThemeDisplay)renderRequest.getAttribute(WebKeys.THEME_DISPLAY);
final PortletConfig portletConfig = (PortletConfig) portletRequest.getAttribute(JavaConstants.JAVAX_PORTLET_CONFIG);
String title = LanguageUtil.format(portletConfig, themeDisplay.getLocale(),
"portlet-title");
renderResponse.setTitle(title);
Hope it works.
Thanks & Regards,
Amit Doshi