Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Web Content with custom language has bug?
Hey guys, I've recently added a new language (ms-MY) into my portal, which is supporting two languages (ms-MY and en-G
. The language selector shows my two languages as options, all is good.
However, when I tried to make web content with translation, this happens after saving and reopening the content.

Basically, I typed "language A" under ms-MY and "language B" under en-GB. However, the content field will reload this weird format that somehow also include en-US. On display, the web content will just display this weird content regardless of the chosen language.
Any idea what may have gone wrong?

However, when I tried to make web content with translation, this happens after saving and reopening the content.

Basically, I typed "language A" under ms-MY and "language B" under en-GB. However, the content field will reload this weird format that somehow also include en-US. On display, the web content will just display this weird content regardless of the chosen language.
Any idea what may have gone wrong?
My Site Settings shows this:

However, my Instance Settings shows this:

However, my Instance Settings shows this:

Woah, that is weird for sure. Might be a bug -- first thing I would try though is making sure that the language options for the Instance Settings include any languages that are used across all the sites that are associated with that instance. I usually also make sure that the following two properties in my portal-ext are overridden with the languages that I am supporting, just for good measure
.. maybe try that (with a restart of course) and see if it helps at all? I also don't see the Malaysian one in the list, but I don't think that should matter -- it would just mean of course that you would have to provide all translations -- but you probably already know that.
#
# Specify the available locales. Messages corresponding to a specific
# language are specified in properties files with file names matching that
# of content/Language_*.properties. These values can also be overridden in
# properties files with file names matching that of
# content/Language-ext_*.properties. Use a comma to separate
# each entry.
#
# If there is more than one locale for the same language, the first one in
# the list will be used when a translation is requested in another locale of
# the same language but a translated value cannot be found. For example, if
# there are two locales such us pt_BR and pt_PT (in this order), any key not
# found in pt_PT will be looked for in pt_BR.
#
# Language codes follow the ISO 639-1 standard. Content for each locale must
# be UTF-8 encoded.
#
# See the following links, which specify language and country codes:
# http://www.loc.gov/standards/iso639-2/php/code_list.php
# http://userpage.chemie.fu-berlin.de/diverse/doc/ISO_3166.html
#
# Env: LIFERAY_LOCALES
#
locales=ar_SA,eu_ES,bg_BG,ca_AD,ca_ES,zh_CN,zh_TW,hr_HR,cs_CZ,da_DK,nl_NL,nl_BE,en_US,en_GB,en_AU,et_EE,fi_FI,fr_FR,fr_CA,gl_ES,de_DE,el_GR,iw_IL,hi_IN,hu_HU,in_ID,it_IT,ja_JP,ko_KR,lo_LA,lt_LT,nb_NO,fa_IR,pl_PL,pt_BR,pt_PT,ro_RO,ru_RU,sr_RS,sr_RS_latin,sl_SI,sk_SK,es_ES,sv_SE,th_TH,tr_TR,uk_UA,vi_VN
#
# Specify the locales that are enabled by default.
#
# Env: LIFERAY_LOCALES_PERIOD_ENABLED
#
locales.enabled=ca_ES,zh_CN,nl_NL,en_US,fi_FI,fr_FR,de_DE,iw_IL,hu_HU,ja_JP,pt_BR,es_ES
.. maybe try that (with a restart of course) and see if it helps at all? I also don't see the Malaysian one in the list, but I don't think that should matter -- it would just mean of course that you would have to provide all translations -- but you probably already know that.
Thanks for the reply Andrew. Do you mean I should remove all the unused locales and just add my required languages (ms_MY and en_G
under locales and locales.enabled?
I have done that for locales but not with locales.enabled. I will try again.

I have done that for locales but not with locales.enabled. I will try again.
I've done as you suggested but the problem persists

Apparently this has something to do with American English still required? I included American English and the bug is gone. How do I remove the dependency of American English?
Hey Jason,
You know what -- as soon as I read your post I had a flash back to this same problem I had once, but a while back -- I think it might have actually been back on version 6.2 even. If my memory serves me right, the issue for me resulted from trying to start the portal up for the first time and not having en-US in place. Now, I'm not sure if modifying this will matter -- honestly I can't remember if I actually solved the problem or figure it out even but I am wondering if you can change something in the system.properties to help.
If you create a file called system-ext.properties in the webapps/ROOT/WEB-INF/classes and in it specify this property with your settings ---
.. instead of the defaults, I wonder if that will help?
You know what -- as soon as I read your post I had a flash back to this same problem I had once, but a while back -- I think it might have actually been back on version 6.2 even. If my memory serves me right, the issue for me resulted from trying to start the portal up for the first time and not having en-US in place. Now, I'm not sure if modifying this will matter -- honestly I can't remember if I actually solved the problem or figure it out even but I am wondering if you can change something in the system.properties to help.
If you create a file called system-ext.properties in the webapps/ROOT/WEB-INF/classes and in it specify this property with your settings ---
#
# Set the default locale used by Liferay. This locale is no longer set at
# the VM level. See LEP-2584.
#
user.country=US
user.language=en
.. instead of the defaults, I wonder if that will help?
Hi Andrew,
That doesn't seem to work either.
In the portal, I tried removing everything, leaving just en_GB. Even with only a single language, without translation required, the Basic Web Content still shows the weird bug with "en_US" in it.
That doesn't seem to work either.
In the portal, I tried removing everything, leaving just en_GB. Even with only a single language, without translation required, the Basic Web Content still shows the weird bug with "en_US" in it.

Hey Jason,
That sucks. I mean, at least you have a work around I suppose but I would open a ticket at https://issues.liferay.com/secure/Dashboard.jspa so that Liferay can be made aware of it and possibly include a fix in a future release.
I'm going to try to reproduce it on my side -- is everything I need to do that included in this thread?
That sucks. I mean, at least you have a work around I suppose but I would open a ticket at https://issues.liferay.com/secure/Dashboard.jspa so that Liferay can be made aware of it and possibly include a fix in a future release.
I'm going to try to reproduce it on my side -- is everything I need to do that included in this thread?
Try this.
1. In portal-ext.properties, set
2. Set both Site Settings and Instance Settings to only have en_GB.
3. Create a Basic Web Content, fill up the title and content, and hit Publish.
4. Reopen the created content, and check the content field again. You'd see the buggy content with en_US reference.
1. In portal-ext.properties, set
locales.enabled=en_GB
2. Set both Site Settings and Instance Settings to only have en_GB.
3. Create a Basic Web Content, fill up the title and content, and hit Publish.
4. Reopen the created content, and check the content field again. You'd see the buggy content with en_US reference.
Did you do this with a fresh bundle? or after you had already started the portlet for the first time? I ask because if it was done after the fact and you have disabled one of the locales, I am wondering if that could be part of the problem.
Hey Andrew, I did it after the start.
Hey Jason,
I think I saw you post something in the slack channel as well and someone from Liferay referenced a JIRA issue logged for this case from an earlier version of 7.1. Are you using the latest (GA3)? or an earlier version?
I think I saw you post something in the slack channel as well and someone from Liferay referenced a JIRA issue logged for this case from an earlier version of 7.1. Are you using the latest (GA3)? or an earlier version?
Ah, I did not get notification on my slack. Yes, I see the discussion now. I'm on 7.1.2 GA3
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™