Fórum

Liferay language change from display settings in control panel

mohit dhuper, modificado 12 Anos atrás.

Liferay language change from display settings in control panel

New Member Postagens: 6 Data de Entrada: 21/12/11 Postagens Recentes
Hi,

I am currently working on localization on our application with liferay framework. The main problems I face is

1) On saving the language setting for a user the language ID is not persisted in db but stored in cookie. So if a user tries to log in from another browser he/she will have to again change his/her preferred language. How to overcome this?
2) A locale identifier gets added to the url . Now in portal-ext if we set locale.prepend.friendly.url.style=0 , the identifier is removed but on logging out and logging in(without clearing cookies) the default language is shown even with the same browser.
3) The above locale identifier that gets added is only in control panel and not in the portal. So when I go back to portal it shows the default locale in the url.

I tried to search a lot on this but to no avail.
Any ideas will be very helpful
thumbnail
Shagul Khajamohideen, modificado 12 Anos atrás.

RE: Liferay language change from display settings in control panel

Liferay Master Postagens: 758 Data de Entrada: 27/09/07 Postagens Recentes
This appears to be a bug. Which version of Liferay are you using? Can you try changing you language from My Account at liferay.com?
mohit dhuper, modificado 12 Anos atrás.

RE: Liferay language change from display settings in control panel

New Member Postagens: 6 Data de Entrada: 21/12/11 Postagens Recentes
I am using liferay version 6.0.6. I recently checked liferay bundle for 6.0.6 which comes with tomcat and it works as it should

1) On saving language settings from My Account it gets persisted in database. So if I connect from any other browser it shows me language based on what user set.
2) On clearing cache and cookies and logging again I see the language user set according to his/her preferences.


Any ideas if I try to debug on login where should I look? It all boils down to what language is fetched at the time of login is it portal language, default language or user language?
Any clues ?
thumbnail
Hitoshi Ozawa, modificado 12 Anos atrás.

RE: Liferay language change from display settings in control panel

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
It happens on this site too. It's a hassle changing language here too.
The problem is further complicated because if I open a new brower, language setting is reset on all browsers
so if I move to another page in the previously opened browser, I have to change the language in that browser
again as well.
I think I've mentioned it here before, but it seems it can't be easily resolved. (sigh)

Luckly for me, my users only require one language so I'm just changing the default language.
mohit dhuper, modificado 12 Anos atrás.

RE: Liferay language change from display settings in control panel

New Member Postagens: 6 Data de Entrada: 21/12/11 Postagens Recentes
But language change works perfectly fine in liferay bundle shipped with tomcat server.
mohit dhuper, modificado 12 Anos atrás.

RE: Liferay language change from display settings in control panel

New Member Postagens: 6 Data de Entrada: 21/12/11 Postagens Recentes
Looking more closely into the issue is that I save any user setting say middle name it is not getting persisted in database. Nothing is saved. But in another build the settings get saved and it works perfectly fine. I use liferay's default hsql database.