Setting up locales for use with Staging

This article describes how to successfully perform local-live staging with the use of language locales/translations.

Resolution

  1. You will need to obtain hotfix-56 and apply it to your bundle. This fix removes an error that requires en_US to be listed as a supported locale in portal-ext.properties. For more details, please look at LPS-29349.
  2. First, determine what language translations will be used in the Liferay Portal. These will need to be set upon initial start-up of the server in the portal-ext.properties. The supported locales are listed in your portal.properties file.
  3. You may also want to set your default language in the portal-ext.properties. For example, let's use Spanish. Your portal-ext.properties will look like:
company.default.locale=es_ES
locales= en_GB,en_US,es_ES

Please be mindful to not to leave any spaces as you list the locales.


Locales/Staging example:

  1. Start server.
  2. Create Web Content by adding a Structure and Template.
    You will need to add the any languages that you have placed in your portal-ext.properties that you desire the content to be translated to.
  3. Save.
  4. Add the Web Content Display Portlet to the site page.
  5. Proceed in configuring Staging as desired.
  • If you'd like to change the company.default.locale, you must do so after staging the content that will be staged. Then, stop the server, input the company.default.locale property, and proceed.
这篇文章有帮助吗?
0 人中有 0 人觉得有帮助