Forums de discussion

Change language manually

LOUIS Nicolas, modifié il y a 13 années.

Change language manually

New Member Publications: 5 Date d'inscription: 22/07/10 Publications récentes
Hello,

I would like to change the language in my spring controller.

I succeed to change the language in the user account, the session and the language cookie...but the language does'nt change...i have to logout and reconnect to see the new language.

Do you have a solution to change programmatically the language of the portal ?

Regards,

Nicolas.

PS: I'm using Liferay 5.2.3
thumbnail
Amos Fong, modifié il y a 13 années.

RE: Change language manually

Liferay Legend Publications: 2047 Date d'inscription: 07/10/08 Publications récentes
Hi,

If you change the language through the language portlet (by clicking the flags), does it work?

If so, you should be able to just copy the code from the ViewAction.processAction() class for the language portlet.
LOUIS Nicolas, modifié il y a 13 années.

RE: Change language manually

New Member Publications: 5 Date d'inscription: 22/07/10 Publications récentes
Hi,

Yes it's working with the flag, and i copied all the code of the ViewAction of the language portlet. And i have to logout to see the new language.

But I can't copy the struts redirect at the end of the action because i'm in Spring Controller...i don't know if it's very important ?

Regards,

Nicolas