Legacy Knowledge Base
Published Jun. 30, 2025

Video fragment using different languages

Written By

Debora Vita

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

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

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

Issue

  • If you add a video fragment using two different languages (english and then chinese, for example) the actual behavior you will see is that the page with english locale will display the other language video (chinese) since it was the last video configured on the page.

    Steps to reproduce behavior:

    1. Create content page
    2. Make sure that you are in English language
    3. Put video fragment and configure it with English video on the page with selected Language as English for the content page
    4. Publish the page
    5. With English locale English video will play properly
    6. Go to edit page again 
    7. Change the page language to Chinese
    8. Configure video fragment with Chinese video on the page with selected Language as Chinese for the content page
    9. Publish the page

     

Environment

  • DXP 7.3, 7.4

Resolution

In order to have the second language video playing accordingly, we have two options (here, we use chinese as second language, but it is applicable to any other language also):

Option One: Add Experiences and Segments based of the Language attribute:

  • Complete steps 1-6 listed in the issue
  • When editing the page, click the Experience drop-down
  • Select "New Experience", then select "New Segment"
  • Give the Segment the name "Chinese Language Segment"
  • For the Segment's properties, select Session > Language, and drag it onto the workspace
  • Set the property to "Language Equals Chinese (China)" and click Save
  • You'll now be returned to the New Experience page, with the newly created segment selected for the audience
  • Give the Experience the name "Chinese Language Experience" and click Save
  • In the experience drop-down, click "Chinese Language Experience" and press the up arrow (^) to move it above the Default experience
  • With the "Chinese Language Experience" currently selected, configure the video fragment to a different video
  • Publish the page
  • View the page in English, verify the English video appears
  • Modify the URL to include a "/zh" right after the domain (URL should start with http://localhost:8080/zh/ in local testing).  This will change the language to Chinese
  • Verify the Chinese video appears

    Option Two: Using as a Web Content:

  • Create a new Web Content titled "English" with the content being the English video
  • For this same web content, create a Chinese translation with the Chinese video
  • Make a content page
  • Add a Web Content Display widget to the page and configure it to display the web content created in step 1+2
  • Publish the page (note, adjusting the translation of the content page edit screen will NOT change the video.  This language drop-down is for the page title and inline fragment text only)
  • View the page in English, verify the English video appears
  • Modify the URL to include a "/zh" right after the domain (URL should start with http://localhost:8080/zh/ in local testing).  This will change the language to Chinese
  • Verify the Chinese video appears

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base