 Dražen
Supporter
Languages:
English (English )
Timezone:
Europe/Zagreb (GMT+02:00)
|
Hello,
sure, take your time and let me know.
Regards,
Drazen
|
|
|
I will test and tell the results, but it takes time.
|
 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
|
|
|
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
|
|
|
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
|
|
|
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.
|
 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
|
|
|
It takes time to prepare the sandbox, but I will do so.
|
 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
|
|
|
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
|
 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
|
|
|
Thanks! This solves the problem. You can close the ticket.
|