Liferay DXP lets you display content based on language, time zone, “right to left” (that is, languages such as Hebrew, Arabic, and Persian), and lets you localize user names and titles. Administrators can localize specific core UI messages so that the messages display in certain languages.
Time zones can be set in the Control Panel and theoretically in the JVM (but this must be set to GMT: see below).
To configure the time zone and customize the default language in the Control Panel, administrators can make changes at the Instance level.
Navigate to the Control Panel → Configuration.
Click Instance Settings.
Click on the Miscellaneous tab.
Using the central left and right arrows, administrators can add or remove
available languages and locales. You can also modify these properties in your
portal-ext.properties file. You’ll find them in the
As an example, the above property changes the locale to English, Great Britain.
It is possible to set time zones at the JVM level. However, users will encounter issues such as Calendar Events and Web Content articles displaying the wrong dates. This happens because the system assumes each date stored in the database is stored in GMT time. When the system needs to display one stored date to the end users, Liferay DXP calculates the display date based on the current date of the application server. This date is affected by the configured JVM level time zone and the stored GMT format date. In order to make sure the display date is calculated correctly, the time zone must be configured to GMT at the JVM level. Otherwise, it will result in incorrect time zone offset and cause the display date to be wrongly calculated and displayed.
In addition to configuring Liferay DXP’s instance settings, users can also provide
unique URLs for specific languages using the
I18nServlet by editing
The defaults that Liferay provides should be sufficient for nearly all circumstances. Because this requires stopping and possibly redeploying Liferay DXP (depending on your app server), test the defaults and make sure you really need to modify these settings. If you’re clustered, you must make these changes on all nodes.
Developers can add or modify certain core UI messages (e.g. Your request completed successfully.) by modifying the language keys that ship by default.
For languages that are displayed right to left, modify the
using the following properties:
Users can change the prefix and suffix values for a locale. For example, for
language_es.properties file contains these values:
For more information, see Using Liferay Language Settings.