Skip to content Skip to sidebar

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

Problem:
If you're trying to translate content inside a Custom HTML Block in WordPress using the Advanced Translation Editor and find that the Custom HTML Block is not available for translation, this is because the Advanced Translation Editor is not designed for translating non-visual elements like HTML. It automatically copies the markup over to the translation, allowing only the included text to be translated.
Solution:
We recommend using the Classic Translation Editor, which supports HTML translation. You can learn more about using the Classic Translation Editor here.
Alternatively, you can switch to the WordPress Editor for translating this content. This allows you full control over the HTML. For guidance on how to use different translation editors for different pages, please visit this link.

If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/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 here.

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 7 replies, has 0 voices.

Last updated by Lucas Vidal de Andrade 2 months, 1 week ago.

Assisted by: Lucas Vidal de Andrade.

Author Posts
May 7, 2025 at 10:31 pm #17009025

barjD-2

Background of the issue:
I am trying to translate content inside a Custom HTML Block in a WordPress page or post using the Advanced Translation Editor.

Symptoms:
No Custom HTML Block available to translate in the Advanced Translation Editor.

I have tried:

Searching strings - no Custom HTML blocks come up for translation in String Translation which are related to the content.

Searching Admin Texts - no Admin Texts come up to add to String Translation to be able to translate the text in the Custom HTML Block.

Note: this is the Custom HTML Block that is part of the native WordPress editor: https://wordpress.org/documentation/article/custom-html/

Please see screenshots for reference.

Questions:
How can I translate content inside a Custom HTML Block using the Advanced Translation Editor?
Why is the Custom HTML Block not available for translation in the Advanced Translation Editor?

May 8, 2025 at 2:49 pm #17012716

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

The Advanced Translation Editor was not designed for translating non-visual elements like HTML.

By default, it should copy the markup over to the translation and make sure that only the included text will be translated.

You would need to use the Classic Translation Editor to be able to translate HTML:
https://wpml.org/documentation/translating-your-contents/using-the-translation-editor/

The downside would be that the Classic Translation Editor does not support automatic translation, translation memory and glossary features of the Advanced Translation Editor.

As another alternative, you could use the WordPress Editor to translate this content:
https://wpml.org/documentation/translating-your-contents/using-different-translation-editors-for-different-pages/

Best regards
Andreas

May 8, 2025 at 6:47 pm #17013447

barjD-2

If we change it in the Classic Translation Editor or WordPress Editor, and then later make other changes in the Advanced Translation Editor, will we lose the changes to that HTML block?

May 9, 2025 at 12:21 pm #17016569

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there,

Actually, you should stick to one translation method for the page that contains the HTML (note that the others will stay as they are, they don't get affected). If you switch to the Classic Translation Editor, you should keep it that way, for example.

My personal suggestion is for you to use the WordPress Editor in this situation. By switching to the WordPress Editor, you'll be able to create the translation as you wish and can have full control over the HTML. I recommend that you create a test post, switch to the WP Editor to test how it works. You can follow the steps on the link, here:
https://wpml.org/documentation/translating-your-contents/using-different-translation-editors-for-different-pages/

Let me know if you have any other questions.

May 9, 2025 at 8:33 pm #17017916

barjD-2

Thank you.

For us, I think it would be hard to remember in the future that this one page should use the WordPress Editor and not the ATE. Because we will get so used to using the ATE as our 'one way' and 'right way' to do this, the brain may not remember which page should use the WordPress Editor, and which one shouldn't.

Could this be added as a feature request, to allow the ATE to bring in Custom HTML blocks for editing?

I can see multiple use cases for this. To give one example, if someone had a form they wanted to embed from a lead capture software (e.g. Hubspot, booking forms), they may want the form to be different for two different languages. This could then send data to the 'right' place, where it can be used by a person speaking the appropriate language.

In our case, we are trying to use a custom icon font to display an SVG that shows English letters. But, we want the Punjabi page to show Punjabi letters. There seems to be no other way to do this unless we either remember to always use the WordPress Editor, or change our CSS.

Markup can be used for different reasons, and there can be a need to translate this markup. It would help if WPML could consider adding support for translating Custom HTML blocks in WordPress.

May 12, 2025 at 7:43 pm #17024534

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there,

When you open the translation, you will automatically open it in the chosen editor, there's no need to remember it. Furthermore, you don't need to always remember to use WP Editor in future cases. When a page contains HTML, use the WP Editor.

I'll create the feature request and keep you informed. To be honest, it's very unlikely that this will get implemented any time soon, as WP Editor already handles such cases and WPML is actually intended to translate other types of content, other than CSS classes, which is the case. I'll keep you informed, ok?

May 12, 2025 at 8:03 pm #17024555

barjD-2

Thank you for submitting this request and being willing to keep us informed.

In this one particular case, yes we are speaking of a CSS class. However, I hope your team can see the other use cases that I mentioned, which would entail more reasons to allow this block to be translatable in the ATE.

The preference for doing it in the ATE is that it is the more up-to-date way, and will allow us to catch everything on the page in one 'go', as we are adding translations.

Thank you for notifying us that WPML will remember which translation editor a page is using. I do foresee that we will, at some point, 'naturally' and without thinking, switch to the ATE when we want to make changes to other parts of the page, since it is the easier translation method to use. This is especially because not all of our team members read in both languages. So having the original language side-by-side with the translation is more practical. I just worry that if we do this, then we will forget that we will lose the change on the Custom HTML block, which can easily be missed while someone is quickly trying to make a text change.

I hope you can understand what I'm trying to convey.

May 15, 2025 at 1:13 pm #17037036

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

Thank you for your patience throughout this discussion.

Once more, to ensure: at this time, it’s not possible to translate Gutenberg HTML blocks directly using the Advanced Translation Editor (ATE). I understand this would be a convenient feature, but currently, WPML does not support this functionality, and there are no immediate plans for its implementation. As supporters, we don’t have insight into if or when this feature might become available. Your request is submitted internally, but there's no deadline or confirmation that will be implemented any time soon.

In the meantime, I recommend the following alternatives:

1. Using the WordPress Editor for manual translations, as explained;
2. Creating custom shortcodes for easier management and translation: Learn how here:
https://wpml.org/documentation/support/language-configuration-files/translate-custom-shortcodes-with-wpml/#translate-shortcodes-non-compatible

Thank you again for your understanding. Please don’t hesitate to reach out if you have any further questions. Otherwise, I'll close this ticket for the meantime.

Have a lovely rest of your day! 🙂

Best regards,
Lucas