Navigation überspringen

Dies ist das technische Support-Forum für WPML – das mehrsprachige WordPress-Plugin.

Mitlesen können alle, doch nur WPML-Kunden können hier Fragen veröffentlichen. Das WPML-Team antwortet im Forum an 6 Tagen pro Woche, 22 Stunden am Tag.

Schlagwörter: 

Dieses Thema enthält 5 Antworten, hat 1 Stimme.

Zuletzt aktualisiert von Bruno Kos Vor 7 Stunden, 48 Minuten.

Assistiert von: Bruno Kos.

Verfasser Beiträge
Dezember 29, 2024 unter 11:00 pm #16551931

sophiaK-11

Hintergrund des Themas:
I have a video on my website, embedded in the original language as iframe via the WordPress editor. In the second language version of the website, I would like to have this video replaced by another video in the second language.

Die Symptome:
I cannot find the iframe code in WPML, neither in the normal translation tool, nor in the string translator or anywhere else.

Fragen:
How can I replace the video in the second language version of my website using WPML?

Dezember 30, 2024 unter 9:59 am #16552721

Prosenjit Barman
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Dhaka (GMT+06:00)

Hello There!
Thanks for contacting WPML Support.

Before this thread gets assigned to my colleague, I'd like to offer some initial guidance or potential solutions.

I understand what you're looking for. If you're embedding the video using the video link, you'll need to translate the link to see a different video in other languages. For the translation, simply add the link to the video you want to display in the translated version.

When translating the page or post containing the video link, the link will appear for translation in the translation editor. For detailed instructions on translating links, please refer to this guide: https://wpml.org/faq/how-to-translate-urls-shortcodes-and-html-attributes-using-the-advanced-translation-editor/

You can type "http" in the search box within the translation editor to quickly find the link for translation.

I hope the information above will help to display a different video per language. However, feel free to let us know if you need further assistance or clarification. We'll be happy to help.

Best regards,
Prosenjit

Dezember 30, 2024 unter 3:22 pm #16553687

sophiaK-11

Thanks for your quick reply. I'm not sure if I understand you correctly. In any case, I cannot solve the issue based on the information provided by you. However, I'm not sure what you mean by "For the translation, simply add the link to the video you want to display in the translated version."

Let my explain my setting in more detail:

On the relevant page (versteckter Link) the following code is implemented to show the video:

<!-- wp:video {"id":3151,"poster":"versteckter Link","className":"my-iframe","guid":"t1YVQ37C","videoPressClassNames":"wp-block-embed is-type-video is-provider-videopress"} -->
<figure class="wp-block-video my-iframe wp-block-embed is-type-video is-provider-videopress"><div class="wp-block-embed__wrapper">
versteckter Link
</div></figure>
<!-- /wp:video -->

In this code, the video link is included (versteckter Link). However, when I open the respective page in the WPML translation editor, the link doesn't show, even if I enter "http" in the search field. In the string translation editor, the code doesn't show, either. Therefore, I do not find any way to provide WMPL with the link to the English version of the video (versteckter Link).

I'm looking forward to receiving further help by you or by one of your colleagues.

Dezember 31, 2024 unter 8:41 am #16555099

Bruno Kos
Supporter

Sprachen: Englisch (English ) Deutsch (Deutsch ) Französisch (Français )

Zeitzone: Europe/Zagreb (GMT+01:00)

Can you please try the following:

1. Navigate to **WPML → Settings → Custom XML Configuration** in your WordPress dashboard.

2. Add the following code snippet into the Custom XML Configuration field:

   <wpml-config>
     <gutenberg-blocks>
       <gutenberg-block type="core/video" translate="1">
         <xpath>//figure/div//a/@href</xpath>
       </gutenberg-block>
     </gutenberg-blocks>
   </wpml-config>

https://wpml.org/documentation/support/language-configuration-files/make-custom-gutenberg-blocks-translatable/#registering-gutenberg

3. After saving this XML configuration, resave the original page containing the video block to apply the changes.

4. Check if the video URL now appears as translatable in WPML.

Let me know if this resolves the issue.

Januar 3, 2025 unter 11:28 am #16561076

sophiaK-11

Hi, sorry for the late reply. Unfortunately, this approach did not solve the problem. However, I have opened another, more general ticket (https://wpml.org/de/forums/topic/seit-der-installation-von-wpml-treten-in-meinem-wordpress-immer-wieder-fehler-auf-insbesondere-mit), as the problem seems to be of a general nature. I hope that in this context my problem with the Videopress video will also be solved. Therefore, this ticket can be closed. Thank you!

Januar 3, 2025 unter 12:35 pm #16561428

Bruno Kos
Supporter

Sprachen: Englisch (English ) Deutsch (Deutsch ) Französisch (Français )

Zeitzone: Europe/Zagreb (GMT+01:00)

Ok, let me close here and will continue on another ticket.