Fórum

using liferay locale

thumbnail
Nishikant sapkal, modificado 13 Anos atrás.

using liferay locale

Junior Member Postagens: 80 Data de Entrada: 16/02/10 Postagens Recentes
I just wanted to know does liferay by default, checks the locale and will display content in particular language depends on locale(if i am using liferay as multilingual cms using web content display in liferay 5.2.3) or will have to do some customization?
thumbnail
Felix Ashirov, modificado 13 Anos atrás.

RE: using liferay locale

Regular Member Postagens: 128 Data de Entrada: 26/02/10 Postagens Recentes
At first Liferay determines users's locale. For unauthentificated users it should be default locale(it can be changed in "Control panel" > "Settings" > "Display settings")/

You can set locale.default.request=true in portal properties. In this case Liferay will determine unauthenticated users' preferred language using the Accept-Language HTTP-header.

Then Liferay checks is there localized content for user's language and displays one, otherwise Liferay displays content for default locale's language.
thumbnail
Nishikant sapkal, modificado 13 Anos atrás.

RE: using liferay locale

Junior Member Postagens: 80 Data de Entrada: 16/02/10 Postagens Recentes
Thanks Felix for your reply,
I tried it but when i am trying to change the default locale its not getting changed its still showing me every thing in my default locale that is English (us)(also not showing any error in log file). What i am trying to achieve is that for testing purpose i am changing my locale to Chinese by or any thing else ("liferay" >"control panel">"display setting") so that everything i will see in Chinese and since my system locale is default English (us)after setting the property locale.default.request=true
in portal_ext.properties and deploying and restart the server i should be able to see everything in English(us)for both authenticate as well as unauthenticated user isn't it? but i got stuck up. Is this the proper way that i am following or is there any other way to to verify this locale test. please let me know.
thumbnail
Felix Ashirov, modificado 13 Anos atrás.

RE: using liferay locale

Regular Member Postagens: 128 Data de Entrada: 26/02/10 Postagens Recentes
Have you cleared cookies in your Browser after changing Liferay configuration?
Liferay sets in your browser a Cookie "GUEST_LANGUAGE_ID" at 1st visit and then uses it as an preferred language for your browser. So for testing purpose clear cookie every time you change Liferay's configuration.

I'm a little confused how do you want Liferay to behave with users' locale
There are two possible behaviors
  • If you want Liferay to use default locale (which is specified in Control Panel > Settings) for all unauthentificated and newly registered users, then set locale.default.request=false in portal-ext.properties.
  • Otherwise set locale.default.request=true

In both cases default locale for registered users (which is specified in User's account > Display Settings) will not be changed

So testing locale settings should consist of 4 steps:
  • Change Liferay Configuration and restart it
  • Clear your Browser cookies
  • Go to liferay homepage and see if content displays in proper locale
  • Sign up as new user and check his locale. Is it what you need?


Good luck