Foren

Set locales enabled

Arundech Limudomsuk, geändert vor 9 Jahren.

Set locales enabled

New Member Beiträge: 11 Beitrittsdatum: 18.07.13 Neueste Beiträge
Dear all
I use Liferay Portal Community Edition 6.2.0 CE GA1 (Newton / Build 6200 / November 1, 2013) with TOMCAT, and I try to set locale_enabled to show in 3 languages in portal-ext.properties. But after clear cache of TOMCAT and restart, it still show all default language in liferay.
Any suggestion? Please help.

Thanks.
Arundech Limudomsuk, geändert vor 9 Jahren.

RE: Set locales enabled

New Member Beiträge: 11 Beitrittsdatum: 18.07.13 Neueste Beiträge
Do someone have any suggestions?
thumbnail
Olaf Kock, geändert vor 9 Jahren.

RE: Set locales enabled

Liferay Legend Beiträge: 6403 Beitrittsdatum: 23.09.08 Neueste Beiträge
If the three languages you set are from the standard set of languages that Liferay brings, this typically works. There's one caveat: If you've ever set this configuration through the UI (in ControlPanel -> Portal Settings -> Display Settings), they will be stored in the database and override what you configure in portal-ext.properties. Thus, you might want to check what you find in Control Panel and might need to configure there instead of portal-ext.properties.
thumbnail
Samuel Kong, geändert vor 9 Jahren.

RE: Set locales enabled

Liferay Legend Beiträge: 1902 Beitrittsdatum: 10.03.08 Neueste Beiträge
You should make the change in the Control Panel.

1. Navigate to: Control Panel > Portal Settings > Display Settings
2. Move the languages you want into the "Current" field.
Petr Bodnár, geändert vor 6 Jahren.

RE: Set locales enabled

New Member Beiträge: 10 Beitrittsdatum: 16.06.17 Neueste Beiträge
The actual answer to the question given is: the property is not named "locale_enabled", but "locales.enabled" - from /portal-impl.jar/portal.properties:

#
# Specify the locales that are enabled by default.
#
locales.enabled=ca_ES,zh_CN,en_US,fi_FI,fr_FR,de_DE,iw_IL,hu_HU,ja_JP,pt_BR,es_ES


Secondly, this is a new property since 6.2 - it was sufficient just to set "locales" in the previous versions. From /portal-impl.jar/portal.properties:

#
# Specify the available locales. [ ... shortened ... ]
#
locales=ar_SA,eu_ES,bg_BG,ca_AD,ca_ES, [ ... shortened ... ]


So as you can see, it is unfortunately quite under-documented - you won't find more explanation on the https://dev.liferay.com/discover/portal/-/knowledge_base/6-2/localization page either.

Finally, this can't be changed via the Control Panel (GUI) as some of the comments above suggest. You can only select from these globally available languages, you cannot modify them from GUI! Tested on LR 6.2.5 GA 6.

PS: A question regarding the above properties was given at https://web.liferay.com/community/forums/-/message_boards/message/86804982 as well.