Legacy Knowledge Base
Published Sep. 10, 2025

Using the default locale property/environment variable won't change the language

Written By

Gergely Szalay

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

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

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

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

Issue

Setting the default language in the portal-ext.properties, with the property

company.default.locale=nl_NL

or as an environment variable

LIFERAY_COMPANY_PERIOD_DEFAULT_PERIOD_LOCALE=nl_NL

 doesn't change the language even after restarting the bundle and deleting the cache.

Environment

Liferay DXP 7.0+

Resolution

The property is only intended for use on the initial startup using a clean database in case of a local Liferay DXP instance. That's because the property will write the settings to the database, and after the first start, you can only change it in the Control Panel > Instance Settings > Localization.

In case of docker images, as they were already started once for testing purposes, either you use the property, or the environment variable, it has already written the setting to the database, therefore it will only work if your bundle is connected to a new external database.

Did this article resolve your issue ?

Legacy Knowledge Base