legacy-knowledge-base
公開されました Jun. 30, 2025

Language Key Import Issue

written-by

Anushka Tiwari

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

Issue

  • When exporting a language key from one instance and then import it to another instance, the translated sentence appears incomplete.
  • Steps to reproduce:

1. Start the server.(Let's say-Instance 1)
2. Navigate to the Control Panel > Language Override.
3. Click on the 'New' button and create a new language key. Say-secondinstancekey. Also, add the translation override in en-US and click on 'Save'.
4. After creating this, click on the ellipses dot in the top right corner and click on 'Export Overridden Translation' and export the key.
5. Shut down the server.
6. Now start the second instance of the same version.
7. Navigate to the Control Panel > Language Override.
8. Click on the ellipses dot in the top right corner and click on 'Import Translations'
9. Then select the exported file (Language_en_US.properties)
10. After importing, search for the imported language key.

Observed Behaviour: The sentence in the translation override in en-US is not completed.
Expected Behavior: The sentence in the translation override in en-US should be completed.

Environment

  • Liferay Quarterly Release

Resolution

  • This concern is the expected behaviour since the “value” field can contain HTML content. For instance, the user could add a key like this
    my-key=Please, add your content inside the <h1> tag
    For security reasons, this content has been sanitized, or, in other words, prevent potentially malicious code from being executed.
  • However, if still want the expected behaviour then:
  1. Navigate to Control Panel > System Settings > Security Tools > AntiSamy Sanitizer.
  2. Add this com.liferay.portal.language.override.model.PLOEntry is in the whitelist in the AntiSamy system configuration in both instances.

Additional Information

did-this-article-resolve-your-issue

legacy-knowledge-base