Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Puj Z
changing language without being redirected to view.jsp
July 21, 2010 4:03 AM
Answer

Puj Z

Rank: Regular Member

Posts: 202

Join Date: January 14, 2010

Recent Posts

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
RE: changing language without being redirected to view.jsp
July 22, 2010 8:33 AM
Answer

William B

Rank: New Member

Posts: 9

Join Date: July 8, 2010

Recent Posts

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.
Puj Z
RE: changing language without being redirected to view.jsp
August 8, 2010 10:00 AM
Answer

Puj Z

Rank: Regular Member

Posts: 202

Join Date: January 14, 2010

Recent Posts

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
RE: changing language without being redirected to view.jsp
April 8, 2013 2:17 AM
Answer

Tse Walter

Rank: New Member

Posts: 1

Join Date: March 21, 2013

Recent Posts

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.