Skip Navigation

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

Problem:
The client is trying to translate HTML code inside the Divi Code Module using the WPML Advanced Translation Editor (ATE), but the HTML code block does not appear in the ATE. The client wishes to translate either the entire HTML block or just the attribute values within the HTML tags.

Solution:
1. We recommend adding a

<p>

tag to the HTML code within the Divi Code Module. This should make the content appear correctly in the ATE for translation.
2. If you need to translate specific attribute values, you can use the WPML String Translation. This allows you to translate individual strings that might not be available in the ATE.

Please note that the solution provided might be irrelevant due to being outdated or not applicable to your case. If the issue persists, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should you need further assistance, please do not hesitate to open a new support ticket in the WPML support forum.

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 Osama Mersal 1 year, 2 months ago.

Assisted by: Osama Mersal.

Author Posts
April 2, 2024 at 2:41 pm #15473711

mattW-27

Tell us what you are trying to do?

I am trying to translate HTML code inside the Divi Code Module using the WPML ATE. However, the HTML code block does not show up in the ATE. I want to be able to translate either the entire HTML block and/or just the attribute values of the HTML tags in the code block.

Is there any documentation that you are following?

https://wpml.org/faq/how-to-translate-urls-shortcodes-and-html-attributes-using-the-advanced-translation-editor/
hidden link

Is there a similar example that we can see?

I've seen other examples with regards to Elementor and WP Bakery builders, but not with Divi.

Advanced Translation Editor - WPML.jpg
Divi Code Module.png
April 2, 2024 at 3:40 pm #15473979

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Thanks for contacting WPML forums support. I'll be glad to help you today.

Please log in to this sandbox site. (hidden link)

After that, please try to replicate the issue. Please let me know how to replicate it to consult our compatibility team.

Best regards,
Osama

April 2, 2024 at 4:18 pm #15474105

mattW-27

Hi,

Thank you for the sandbox environment. I recreated the issue there:

- Created a page with the Divi builder called "WPML Divi Code Module Test".
- On the page I added a Divi Text Module and a Divi Code Module (with some HTML)
- You can see that when you try to translate the page in another language (e.g. German) using the ATE, that you can translate the text from the Divi Text Module but not the HTML from the Divi Code Module.

Thanks,

Matt

Screenshot 2024-04-02 at 12.14.53 PM.png
Screenshot 2024-04-02 at 12.14.12 PM.png
April 2, 2024 at 4:46 pm #15474369

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi Matt,

I added a <p> tag in the code module, and it's translated correctly. Please check this page. (hidden link)

Best regards,
Osama

April 2, 2024 at 5:15 pm #15474628

mattW-27

Hi Osama,

But I would like to translate the HTML code itself. For example:

English

<div custom-attribute="custom-value-1"></div>

German

<div custom-attribute="custom-value-2"></div>

Thanks,

Matt

April 2, 2024 at 5:29 pm #15474652

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi Matt,

You can translate them using String Translation. (Please check the attached screenshot)

Best regards,
Osama

2024-04-02_19-27-40.jpg
April 2, 2024 at 7:32 pm #15474929

mattW-27

Thank you. That works. So there is no way to achieve this with the ATE?