Fórum
How to change portlet title on the basis of language selected?
Neetu Mishra, modificado 11 Anos atrás.
How to change portlet title on the basis of language selected?
Junior Member Postagens: 75 Data de Entrada: 21/05/12 Postagens Recentes
Hi,
I am creating a custom portlet & I want to change portlet title on the basis of language selected by the user. I know how to change the portlet's content but didn't get any solution to change the portlet's title.
Thanks in advance!!
Regards,
Neetu
I am creating a custom portlet & I want to change portlet title on the basis of language selected by the user. I know how to change the portlet's content but didn't get any solution to change the portlet's title.
Thanks in advance!!
Regards,
Neetu
DarshanKumar N Bhatia, modificado 11 Anos atrás.
RE: How to change portlet title on the basis of language selected? (Resposta)
Junior Member Postagens: 85 Data de Entrada: 02/03/10 Postagens Recentes
For any kind of portlet (custom /inbuilt one):
To change Title for particular locale :
1) Deploy portlet on page.
2) Click on Look and feel --> Portlet Configuration Tab
Check : Use Custom Title
Provide ur custom title Name and select a language corresponding to it.
Save.
Test it : By Putting langauge Portlet and changing to various locale.
To change Title for particular locale :
1) Deploy portlet on page.
2) Click on Look and feel --> Portlet Configuration Tab
Check : Use Custom Title
Provide ur custom title Name and select a language corresponding to it.
Save.
Test it : By Putting langauge Portlet and changing to various locale.
Dhrutika Parekh, modificado 11 Anos atrás.
RE: How to change portlet title on the basis of language selected? (Resposta)
Expert Postagens: 435 Data de Entrada: 09/02/09 Postagens Recentes
Hi Nitu,
One solution is as provided in above post if you do it by configuration,
Other way is by changing in xml:
Regards,
Dhrutika
One solution is as provided in above post if you do it by configuration,
Other way is by changing in xml:
- Enter Resource bundle path in your portlet.xml.(i.e. <resource-bundle>com.my.langauage.Resource.Navigation.Language</resource-bundle>)
- On defined path place Language_*.properties files.
- In these files make respective language entries (i.e.Language_en.properties : javax.portlet.title=Navigation ,Language_es.proeprties=Navegaci\u00F3n)
Regards,
Dhrutika
Neetu Mishra, modificado 11 Anos atrás.
RE: How to change portlet title on the basis of language selected?
Junior Member Postagens: 75 Data de Entrada: 21/05/12 Postagens Recentes
Thanks Dhrutika & DarshanKumar for your quick replies!!
Hey DarshanKumar, this is also a nice way of doing it. I knew about the custom titles but didn't knew that we can change it on the basis of language as well. So thanks once again.
Hey Dhrutika I have a question about resource bundle path:
It might be very simple question but apologize me for that.
Since, I am placing language_*.properties files in docroot/WEB-INF/src/content folder so is it ok to put resource bundle path like this??
I have tried this but it's not working, so I think I am missing some thing. Please help me regarding this. Thanks once again!!
Thanks in advance!!
Hey DarshanKumar, this is also a nice way of doing it. I knew about the custom titles but didn't knew that we can change it on the basis of language as well. So thanks once again.
For any kind of portlet (custom /inbuilt one):
To change Title for particular locale :
1) Deploy portlet on page.
2) Click on Look and feel --> Portlet Configuration Tab
Check : Use Custom Title
Provide ur custom title Name and select a language corresponding to it.
Save.
Hey Dhrutika I have a question about resource bundle path:
Enter Resource bundle path in your portlet.xml.(i.e. <resource-bundle>com.my.langauage.Resource.Navigation.Language</resource-bundle>)
It might be very simple question but apologize me for that.
Since, I am placing language_*.properties files in docroot/WEB-INF/src/content folder so is it ok to put resource bundle path like this??
<resource-bundle>content</resource-bundle>
I have tried this but it's not working, so I think I am missing some thing. Please help me regarding this. Thanks once again!!
Thanks in advance!!
Muzakir Khan, modificado 11 Anos atrás.
RE: How to change portlet title on the basis of language selected?
Regular Member Postagens: 112 Data de Entrada: 15/03/12 Postagens RecentesNeetu Mishra:
Since, I am placing language_*.properties files in docroot/WEB-INF/src/content folder so is it ok to put resource bundle path like this??<resource-bundle>content</resource-bundle>
I have tried this but it's not working, so I think I am missing some thing. Please help me regarding this. Thanks once again!!
Try this,
<resource-bundle>content/language.properties</resource-bundle> BOL
Regards
Khan
Neetu Mishra, modificado 11 Anos atrás.
RE: How to change portlet title on the basis of language selected? (Resposta)
Junior Member Postagens: 75 Data de Entrada: 21/05/12 Postagens Recentes
Hi Muzakir,
Thanks for your reply.
I have tried this but it was flagging a warning in Eclipse that file name should not end with .properties. So I have tried this:
& it's working.
Thanks once again for your suggestion!!
Thanks for your reply.
Try this,
<resource-bundle>content/language.properties</resource-bundle>
I have tried this but it was flagging a warning in Eclipse that file name should not end with .properties. So I have tried this:
<resource-bundle>content/language.properties</resource-bundle>
& it's working.
Thanks once again for your suggestion!!
Akash Jaisawal, modificado 9 Anos atrás.
RE: How to change portlet title on the basis of language selected?
Regular Member Postagens: 141 Data de Entrada: 03/03/12 Postagens Recentes
I have tried this but it was flagging a warning in Eclipse that file name should not end with .properties. So I have tried this:
& it's working.
Thanks once again for your suggestion!!
Sorry Neetu but i didnt get you point here!
You have tried this "
and it worked?
<resource-bundle>content/language.properties</resource-bundle>
& it's working.
Thanks once again for your suggestion!!
Sorry Neetu but i didnt get you point here!
You have tried this "
<resource-bundle>content/language.properties</resource-bundle>
" but it was flagging a warning in Eclipse that file name should not end with .properties. So You have tried again this:<resource-bundle>content/language.properties</resource-bundle>
and it worked?
Akash Jaisawal, modificado 9 Anos atrás.
RE: How to change portlet title on the basis of language selected?
Regular Member Postagens: 141 Data de Entrada: 03/03/12 Postagens Recentes
Or there should be only:
Sorry if am wrong somewhere!
<resource-bundle>content/language</resource-bundle>
?Sorry if am wrong somewhere!
Neetu Mishra, modificado 9 Anos atrás.
RE: How to change portlet title on the basis of language selected?
Junior Member Postagens: 75 Data de Entrada: 21/05/12 Postagens RecentesAkash Jaisawal:
Or there should be only:?<resource-bundle>content/language</resource-bundle>
Sorry if am wrong somewhere!
Hi Akash,
Thanks for correcting me
I have tried this:
<resource-bundle>content/language</resource-bundle>
Akash Jaisawal, modificado 9 Anos atrás.
RE: How to change portlet title on the basis of language selected?
Regular Member Postagens: 141 Data de Entrada: 03/03/12 Postagens RecentesNeetu Mishra:
Akash Jaisawal:Or there should be only:?<resource-bundle>content/language</resource-bundle>
Sorry if am wrong somewhere!
Hi Akash,
Thanks for correcting me
I have tried this:<resource-bundle>content/language</resource-bundle>
Hello Neetu,
I ve followed these steps but not succeed to achieve the task!
any other way to change the title programmatically?
Neetu Mishra, modificado 9 Anos atrás.
RE: How to change portlet title on the basis of language selected?
Junior Member Postagens: 75 Data de Entrada: 21/05/12 Postagens Recentes
hi Akash,
There is no other way to change the title programatically
There is no other way to change the title programatically
Akash Jaisawal, modificado 9 Anos atrás.
RE: How to change portlet title on the basis of language selected?
Regular Member Postagens: 141 Data de Entrada: 03/03/12 Postagens RecentesNeetu Mishra:
hi Akash,
There is no other way to change the title programatically
ohh..
I tried all the steps you mentioned bit nothing happns
Vipin Bardia, modificado 9 Anos atrás.
RE: How to change portlet title on the basis of language selected?
Regular Member Postagens: 162 Data de Entrada: 28/02/11 Postagens Recentes
Hi Akash,
This should work -
Regards.
This should work -
renderResponse.setTitle(LanguageUtil.get(renderRequest.getLocale(), "keyname"));
Regards.
Shreyas Kamthe, modificado 9 Anos atrás.
RE: How to change portlet title on the basis of language selected?
Junior Member Postagens: 58 Data de Entrada: 09/06/14 Postagens Recentes
Hi everybody,
Can anybody tell me how to customize the portlet for a new added language.
I am trying to set the title to the newly added language but the title shows me "????" .
Can anybody suggest me a solution ?
Is this because i have not made an entry in the portlet.xml ?
Please do reply
Can anybody tell me how to customize the portlet for a new added language.
I am trying to set the title to the newly added language but the title shows me "????" .
Can anybody suggest me a solution ?
Is this because i have not made an entry in the portlet.xml ?
Please do reply