Foros de discusión

Liferay forcing the language to "en"

thumbnail
Erik Forsström, modificado hace 13 años.

Liferay forcing the language to "en"

Junior Member Mensajes: 59 Fecha de incorporación: 25/03/10 Mensajes recientes
Hey again :-)

This next issue is a mild annoyance at best, but I still would like to know what is the reason for it and a possible fix if there is one.

I have set the default language in my portal to finnish and all the users have their language set to finnish. But for some reason, the portal seems to force the language to english constantly. Whenever I open the main page of the portal with any browser (http://www.myportaladdress.com) it automatically puts the address into http://www.myportaladdress.com/en/. The same happens with any page inside the portal. For example the page "http://www.myportaladdress.com/dir1/dir2" is automatically forwarded to "http://www.myportaladdress.com/en/dir1/dir2"

A similar thing happens when I login to the portal and the control panel is in english. It does change to finnish if I go to my user settings and simply press save without actually changing anything since my language is already set to finnish.

Any idea what setting might be overriding the language like this?
Can I perhaps force the setting in portal-ext.properties or somesuch?

Thanks for any help.
thumbnail
Erik Forsström, modificado hace 13 años.

RE: Liferay forcing the language to "en"

Junior Member Mensajes: 59 Fecha de incorporación: 25/03/10 Mensajes recientes
I managed to "fix" the problem by adding a language portlet to a page and selecting the finnish language there. After that the /en/ disappeared from the url and the control panel stayed as finnish. It also didn't reapper after starting up the browser again. Still no idea what actually caused the problem, but if anyone else is wrestling with similar issues, try the language portlet.
Oliver Bayer, modificado hace 13 años.

RE: Liferay forcing the language to "en"

Liferay Master Mensajes: 894 Fecha de incorporación: 18/02/09 Mensajes recientes
Hi Erik,

do you've changed the default language property after you've started the portal for the first time? You're logged in users always get the right language (finnish)?

If you've answered both questions with "yes" then you should take a look at the "user_" table and change the language of the default user (the only entry in the table where defaultuser column is set to true) and maybe his timezone. If you've changed the column contents during server runtime navigate to the control panel and reset the database cache. Now logged out users (a.k.a. guest or default users) should see the page in finnish.

HTH Oli
thumbnail
Erik Forsström, modificado hace 13 años.

RE: Liferay forcing the language to "en"

Junior Member Mensajes: 59 Fecha de incorporación: 25/03/10 Mensajes recientes
It is possible, that the first language used was indeed english and that set the parameters for the default user.

After I changed the settings with the language portlet the defaultuser seems to have finnish language set and everything is working fine. Thank you for the answers though! They would have solved my problem as well :-)
thumbnail
Hitoshi Ozawa, modificado hace 13 años.

Resolved: Liferay forcing the language to "en"

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
So it was just the guest user default language. Nice to know you got it fixed.
thumbnail
Hitoshi Ozawa, modificado hace 13 años.

RE: Liferay forcing the language to "en"

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
It may be the cache. Have you tried clearing the vm cache? Control Panel - Server Administration