Issue
- Trying to change the web content to multiple languages but users are unable to see multiple options for web content.
Environment
- Liferay DXP 7.4 [all versions]
Resolution
There are the following steps to add multiple languages to the web content.
1. Add multiple languages in the 'portal-ext.properties':
locales=en_US,en_AU,hi_IN,zh_CN
locales.enabled=en_US,en_AU,hi_IN.zh_CN
2. Now navigate to Control Panel> Instance settings > Localization and add the languages from the 'Available' to the 'Current' section.
3. Create Web content, navigate to Menu-> Content & Data-> Web Content, create web content with the name of Demo, and save it.
4. Click on the 'ellipsis' "⋮" on the right side of the "Demo" web content and select the "Translate" option.
5. Select a language from the top "Translate From 🇺🇸️ ️to 🇮🇳️️️" and change the "Title" and "Content" to "Hindi" and Publish it.
6. Again Translate the "Demo" web content "Translate From 🇺🇸️ ️to 🇨🇳️️" and change the "Title" and "Content" to the Chinese language and Publish it.
7. After that, add the "Demo" web content and the "Language Selector" on the Home UI then Publish it.
8. Now, click on the "Language Selector 🇺🇸️" option, it shows the multiple options of languages to change the web content.