Issue
- We want to have both American English and British English available in the Instance settings, but only use one of them on a site that has a non-English language set as the default language.
- The URL should be displayed as follows: www.portal.com/en
but the long form of the language is shown: www.portal.com/en_GB - After changing the order of English languages in the Available Languages section, and brought
en_GBbeforeen_US. It resolved the issue for once, but with new changes to the environment, this change no longer works. The order of the languages no longer matters so theen_GBwill display in the URLs in long-form.
Environment
- DXP 7.2
Resolution
- The default language of the portal is
en_US, however, on home pages for other countries the available languages are a local language (e.g.de_DE) +en_GB(and noten_US). -
The problem is related to these multilingual country pages, where the English language is appearing in the long-form in the URL with
en_GB. - This is the intended behavior of Liferay because the core product is designed to use the long-form of
en_GBanden_USto differentiate between them if they are both available. - This means that in order to achieve the needed behavior (having
www.portal.com/eninstead ofwww.portal.com/en_GBwhile 2 English language variations are enabled) means changing the core of a feature.
Workarounds
- Delete one of the English locales.
- You can try to configure a rule on the webserver level to redirect to the desired URL. This thread is an example of what we mean, or you can also see this article for nginx redirection for more detailed redirection examples.
-
Open a Feature Request that will be evaluated by our Product Team.
- This is our official process that will allow our Product Team to assess the request.
- You can add your personal touch to the product by writing down the details in the description.
- Feel free to add further comments to discuss the remaining details with the team.
- Please note that the implementation of feature requests is subject to our developers' decision, and the new feature can only be added to our future Liferay releases.
-
Customization
Modifying Liferay's source code and developing your own solution to fit your business needs are always available to you. Please note that doing so may result in limited support for bugs that originate from modifying the code. -
Global Services Team
Involve our Global Services team by reaching out to your Liferay representative.