English (United States) cannot be removed from the list of available locales

Issue

  • This document describes a scenario where English (United States) could not be removed from the list of available locales during the initial setup (also known as the Portal Setup Wizard)
  • In this example, we want to try and set English (Australia) as our default locale, so we prepared the bundle as follows:
    • In portal-ext.properties, include
      • company.default.locale=en_AU 
        locales.enabled=en_AU
        locales=en_AU
        index.search.spell.checker.supported.locales=en_AU
  • However, when starting up, we see an error (LayoutNameException) and see both English (United States) and English (Australia) in the list of locales, even if English (United States) has been removed.

Environment

  • Liferay DXP 7.4

Resolution

  • We will need to add a system-ext.properties to override the existing Liferay system.properties. In this test case, I will be demonstrating how we can perform this action in Tomcat:
    1. Go to ${liferay.home}/tomcat-*/webapps/ROOT/classes
    2. Create a file called system-ext.properties (while we retain the aforementioned portal-ext.properties file)
    3. Include the following properties (in this case, for English (Australia)):
      • user.country=AU
        user.language=en
    4. Restart the server
    5. Observe that the Portal Setup Wizard's dropdown only shows English (Australia)

 

这篇文章有帮助吗?
0 人中有 0 人觉得有帮助