Skip to content Skip to sidebar

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

Problem:
The client is experiencing issues with translating image captions in the Kadence theme using WPML. The captions do not appear in the WPML translation editor, and there are issues with the Media Translation feature getting stuck.
Solution:
First, ensure that the option to translate Media Library texts (alt, caption, title) is enabled in WPML > Settings > Media translation. If translating image title/alt added via the Image ADV block in Kadence, add the following XML configuration in WPML > Settings > Custom XML configuration:

<wpml-config><br />  <gutenberg-blocks><br />    <gutenberg-block type="kadence/image" translate="1"><br />      <xpath>//img/@alt</xpath><br />      <xpath>//img/@title</xpath><br />      <xpath>//figcaption</xpath><br />    </gutenberg-block><br />  </gutenberg-blocks><br /></wpml-config>

After adding the XML, re-save the original page and make a small content change if needed, then update/reopen the translation. This should allow the figcaption to appear correctly inside the Translation Editor as it does on the sandbox site.

If this solution does not resolve your issue or seems outdated, we 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. If problems persist, please open a new support ticket at 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 25 replies, has 0 voices.

Last updated by ulrichH-8 1 month, 2 weeks ago.

Assisted by: Dražen.

Author Posts
May 4, 2026 at 6:09 am #18009839

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

sure, take your time and let me know.

Regards,
Drazen

May 7, 2026 at 6:40 pm #18021279

ulrichH-8

I will test and tell the results, but it takes time.

May 8, 2026 at 6:14 am #18021607

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks, I took some time and checked and installed all the required things and reporduced the issue.

So, there are 2 things if you are adding image text from WP / Media library and wish to translate them via WPML editor, you need to enable this from WPML > Settings > Media translation > Translate Media Library texts (alt, caption, title) when translating content.

If you wish to translate image title / alt added via Image ADV block, then you need to add next code to WPML > Settings > Custom XML configuration

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="kadence/image" translate="1">
      <xpath>//img/@alt</xpath>
      <xpath>//img/@title</xpath>
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

Make a small change to default language page, save and translate and it should be fine.

Please check, and test if you wish on sandbox website and let me know if you need any further help.

Regards,
Drazen

Settings-‹-Harmonious-Tabla-—-WordPress-05-08-2026_08_10_AM.jpg
May 10, 2026 at 5:36 pm #18025240

ulrichH-8

Message received on 8 May 2026 as follows:

Hello,

thanks, I took some time and checked and installed all the required things and reporduced the issue.

So, there are 2 things if you are adding image text from WP / Media library and wish to translate them via WPML editor, you need to enable this from WPML > Settings > Media translation > Translate Media Library texts (alt, caption, title) when translating content.

If you wish to translate image title / alt added via Image ADV block, then you need to add next code to WPML > Settings > Custom XML configuration

//img/@alt
//img/@title

Make a small change to default language page, save and translate and it should be fine.

Please check, and test if you wish on sandbox website and let me know if you need any further help.

Regards,
Drazen

May 10, 2026 at 5:41 pm #18025241

ulrichH-8

1) WPML > Settings > Media translation > Translate Media Library texts (alt, caption, title) when translating content.
=> This option has already been enabled:
"Automatically detect best options for translating image texts (alt, caption, title)
avoids unnecessary duplicate media fields and missing image translations"

2) I tried adding to the "Custom XML Configuration" the following rows:

//img/@alt
//img/@title

Then I get the following error message:

Line: 1, Column: 1 Start tag expected, '<' not found

So, I tried the following code, which does not lead to an error message:

<wpml-config>
<shortcodes>
<shortcode>
<tag>img</tag>
<attributes>
<attribute>alt</attribute>
<attribute>title</attribute>
</attributes>
</shortcode>
</shortcodes>
</wpml-config>

But that does not resolve the problem. Please tell how to embed correctly these two rows:

//img/@alt
//img/@title

May 10, 2026 at 8:42 pm #18025489

ulrichH-8

Please skip my last two message of May 10, 2026 at 5:36 pm and May 10, 2026 at 5:41 pm: I only saw the e-mail without the screenshot and without XML code components.

Now I was able to adapt the settings according to your screenshot. Furthermore, I placed the XML code <wpml-config>... at the "Custom XML Configuration". But this does still not resolve the problem:

Now WPML translates the file names of the graphics and photos, but still not their captions.

May 11, 2026 at 5:55 am #18025720

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for getting back.

Can you please first check on sandbox test site and let me know if it works fine there? If not, please try to reproduce the issue and share steps with me.

If it works on sandbox, then we just need to apply same settings / steps to your website.

Let me know.

Regards,
Drazen

May 18, 2026 at 5:13 am #18041471

ulrichH-8

It takes time to prepare the sandbox, but I will do so.

May 18, 2026 at 5:59 am #18041505

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

it is already prepared, same one where I ahve tested, you just need to check my test page and if it works there and if not adjust text block how you are using it so I can see the issue.

- hidden link

Let me know how it goes.

Regards,
Drazen

May 21, 2026 at 7:47 pm #18052668

ulrichH-8

Dear Drazen,

So now, I tested. First, I installed the "Kadence Blocks - PRO Extension". Then I created a test page.

Please have a look at
hidden link
and
hidden link

The problem replicates exactly: No translation of the captions of the two images.

Kind regards,
Ulrich

May 22, 2026 at 6:26 am #18053091

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello Ulrich,

thanks for testing and for preparing the clean example.

Please add next XML to WPML > Settings > Custom XML

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="kadence/image" translate="1">
      <xpath>//img/@alt</xpath>
      <xpath>//img/@title</xpath>
      <xpath>//figcaption</xpath>
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

Then:

- re-save the original page
- make a small content change if needed
- update/reopen the translation

The figcaption should then appear correctly inside the Translation Editor as it does in sandbox site.

Regards,
Drazen

May 27, 2026 at 9:07 pm #18064839

ulrichH-8

Thanks! This solves the problem. You can close the ticket.