Legacy Knowledge Base
Published Jul. 2, 2025

Guest user is unable to see the different locales after updating to SP17 or above

Written By

Sivakumar Perumal

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

While we make every effort to ensure this Knowledge Base is accurate, itmay not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with anyfeedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

Before using any information from this article, independently verify itssuitability for your situation and project.

Issue

  • After updating the portal from SP17 or above, locales are not working for guest users

Environment

  • Liferay Portal 6.2

Resolution

Set this to 0 if the locale is not automatically prepended to a URL. This means that each URL could potentially point to many different languages. For example, the URL http://localhost:8080/web/guest/home could then be viewed by users in many different languages.


Set this to 1 if the locale is automatically prepended to a URL when the requested locale is not the default locale. This means that each URL points to just one language. For example, the URL http://localhost:8080/web/guest/home would point to the default language. The URL http://localhost:8080/zh/web/guest/home and http://localhost:8080/zh_CN/web/guest/home would both point to the Chinese language.
In cases where the prepended locale is "zh" and not the complete locale "zh_CN", then the full locale returned will be based on the order in which the locales appear in the property "locales". If "zh_CN" appears before "zh_TW", then "zh" will be a short hand for "zh_TW".
The default language is set in system.properties with the properties "user.country" and "user.language".

Set this to 2 if the locale is automatically prepended to every URL. This means that each URL points to just one language.

Set this to 3 if the locale is automatically prepended to a URL when the requested locale is not the default user locale. In the case of guest users, the behavior is the same as having a value of 1.
Note that each language requires an entry in the property "locales" and a servlet mapping in web.xml for the I18n Servlet.
Default:

    locale.prepend.friendly.url.style=3
  • Setting the value '0' to the above property will allow the guest user to see the different locales.

Additional Information

As per the statement provided in portal.properties for the below property, the guest user should not see the different locales whereas the logged user should be able to see the same.

Set this to 3 if the locale is automatically prepended to a URL when the requested locale is not the default user locale. In the case of guest users, the behavior is the same as having a value of 1.
Note that each language requires an entry in the property "locales" and a servlet mapping in web.xml for the I18n Servlet.
Default:

    locale.prepend.friendly.url.style=3

Observed Behavior in portal-127 or below:
The guest user is able to see the different locales(turns into a regression bug).

Observed Behavior in SP17(portal-128) or above:
The guest user is not able to see the different locales(i.e. working as stated in the portal.properties).

Behavior changes:
The behavior observed in SP16 or below is a regression bug. This was reported on the ticket LPS-65302, and it has solved in SP17. Since it is fixed in SP17, the same behavior is observed for the upcoming SP versions as well.

Did this article resolve your issue ?

Legacy Knowledge Base