Legacy Knowledge Base
Published Jul. 2, 2025

How to translate links for the Button fragment?

Written By

Rita Schaff

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

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

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

Before using any information from this article, independently verify itssuitability for your situation and project.

Issue

  • If you add a button to a page with a link /home, switch the language to another one, change the  button's link to /de/home, then switch back to the original language, the link cannot be translated, it only contains the last change no matter what language was used.

Environment

  • DXP 7.3

Resolution

  • This is a limitation on DXP 7.3 and below, however, we have implemented the possibility of adding translations to the Button fragment as a new feature in DXP 7.4. Upgrading to that version is the most optimal choice.

Workaround (video attached)

You can create an asset to contain the link. Since asset fields are localizable, and can be set as targets for the link, you can create a web content article or a document to store the values for the different translations of the URL. Then set the web content or the document as the target for the button and the asset field's value will always be taken from the correct translation. Meaning, that if the user views the page in French, the French translation of the content/document will be taken - and the correct link will be displayed.

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base