Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
When using the Elementor video widget and setting the source option to “Self Hosted”, the link of the poster image can't be translated.

Solution:
1. Go to WPML > Settings > Custom XML configuration tab
2. Add the following XML:

<wpml-config>
  <elementor-widgets>
    <widget name="video">
      <conditions>
        <condition key="widgetType">video</condition>
      </conditions>
      <fields>
        <field type="hosted_url: Link URL" editor_type="LINK">hosted_url>url</field>
        <field type="poster: Link URL" editor_type="LINK">poster>url</field>
      </fields>
    </widget>
  </elementor-widgets>
</wpml-config>

3. Edit the page in the default language and make a small change then save it
4. Update the translation
5. Use the search field to find the poster's link and translate it

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by wang-fungW 2 years, 6 months ago.

Assisted by: Mohamed Sayed.

Author Posts
December 1, 2022 at 3:48 am #12567279

wang-fungW

Use "Elementor Video", the html code like below

<video class="elementor-video" src="Video URL" controls="" controlslist="nodownload" poster="Video Poster"></video>

i want translate the Video Poster(image url)
i already upload the img for media translate
i try to use custom xml to make it happen but don't know how

December 1, 2022 at 8:53 pm #12574457

Mohamed Sayed

Hi there,
Thanks for contacting WPML support.

1) To ensure the quickest and most accurate support, please provide your debug information so that I can get a look at some of your configurations. You can find it in WPML > Support > click on “Debug information” link. Please check this link for more info: http://wpml.org/faq/provide-debug-information-faster-support/

2) Could you please tell me if you mean the basic video widget from Elementor or a custom one created by your theme?

I tested the basic one and the link is available for translation in the advanced translation editor as you see in the attached screenshot (You need to use the search field in the editor to find it as it's hidden by default).

Also, the image is translated by the WPML media translation, please check the page here and switch the language to see the translated content: hidden link

Regards,
Mohamed

Screenshot_587.jpg
December 4, 2022 at 3:25 am #12584985

wang-fungW

I use basic elementor video widget
The video url I don't see any problem
It is the poster,it is the cover image for video, one of setting call "poster".

Of course I already search the url to translate video and poster url but can't find the poster url, and also media translate already upload each language image
It just don't work at all

I find other way to make it happen
Use template for each language and insert to the page

December 4, 2022 at 3:47 pm #12586609

Mohamed Sayed

Hi,

I tested again and found that the Poster option is available when I use the self-hosted source option while I was testing with the Youtube source option.

I can replicate the same issue on a clean installation and the link of the poster can't be found with the translation editor or string Translation.

I escalated this issue to the 2nd tier support team as I couldn't fix it with custom XML and will update you once I get their reply.

Regards,
Mohamed

December 5, 2022 at 8:53 am #12589053

Mohamed Sayed

Hi,
Thanks for your patience.

Please try the following steps:

1. Go to WPML > Settings > Custom XML configuration tab
2. Add the following XML:

<wpml-config>
  <elementor-widgets>
    <widget name="video">
      <conditions>
        <condition key="widgetType">video</condition>
      </conditions>
      <fields>
        <field type="hosted_url: Link URL" editor_type="LINK">hosted_url>url</field>
        <field type="poster: Link URL" editor_type="LINK">poster>url</field>
      </fields>
    </widget>
  </elementor-widgets>
</wpml-config>

3. Edit the page in the default language and make a small change then save it
4. Update the translation
5. Use the search field to find the poster's link and translate it

Let me know please if that helps.

Regards,
Mohamed

December 5, 2022 at 11:32 am #12590557

wang-fungW

It's work now
If only use media translate to finish that setting will be better

My issue is resolved now. Thank you!