Foros de discusión

changing language without being redirected to view.jsp

thumbnail
Puj Z, modificado hace 13 años.

changing language without being redirected to view.jsp

Regular Member Mensajes: 220 Fecha de incorporación: 14/01/10 Mensajes recientes
Hi,

I have a portlet with two different languages. The language files work properly and the messages get translated when I click on another language.
I have added the language portlet on top of my portlet so that users can change the language whenever they want. so far everything perfect.
The problem: When a user is one a certain page of the portlet and clicks on another langauge, he\she is redirected to the first page (view.jsp) of the portlet. What can I do to make the portlet stay on the same page (jsp file) after changing the language?

Any help would be appreciated!

I am using lp5.2.3-Tomcat6.0 with mysql5.1, although I don't think if that really matters
William B, modificado hace 13 años.

RE: changing language without being redirected to view.jsp

New Member Mensajes: 9 Fecha de incorporación: 8/07/10 Mensajes recientes
Isn't it the <restore-current-view> setting in liferay-portlet-ext-xml?
If it's set to false, it ll go back to view.jsp.
thumbnail
Puj Z, modificado hace 13 años.

RE: changing language without being redirected to view.jsp

Regular Member Mensajes: 220 Fecha de incorporación: 14/01/10 Mensajes recientes
Hi William,

thanks for the info and sorry for my late response.
<restore-current-view> is by default set to true and I didn't change anything in my portlet. I even set it to true to be on the safe side, but to no avail.

Do you mean I have to set it to "true" in the language portlet's liferay-portlet.xml? And if so, how can I do it? I looked in the setting part of liferay and there is no possibility to change this attribute by using the portal inteface. Do I need to use hooks or ext in order to do that?
Thanks for your help in advance!
Tse Walter, modificado hace 11 años.

RE: changing language without being redirected to view.jsp

New Member Mensaje: 1 Fecha de incorporación: 22/03/13 Mensajes recientes
Dear Puj,

Did you get any solution for that?
I have also encountered this issues from my custom portlet.
It always redirect itself to the view.jsp when i changed it in different languages.

Thanks and looking forward to your reply.