Skip Navigation

[Escalated to 2nd Tier] Image Slider Block and alt text translation with WPML

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 10 replies, has 2 voices.

Last updated by Waqar 1 month ago.

Assigned support staff: Waqar.

Author
Posts
#2149927

Tell us what you are trying to do?
Hello,

I've created a small product catalogue with Toolset for a multilingual website (french and english languages).
Each product page is made from a Toolset Content Template in which there is a Toolset Image Slider block.

Everything is going well except for one thing.
I can't find the solution to display the alt text of each of the image in the slider in the correct language.
The alt text is always the English version.

I'm using WPML.
In the media library I can see that alt texts are correctly translated when switching from one language to the other.

What is the link to your site?
A product page example in french: hidden link
And in English: hidden link

Thank you

#2150407

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting us and I'd be happy to assist.

During testing on my website, I was able to reproduce this behaviour and the Toolset's "Image Slider" block seems to always show the image 'alt' text from the primary language.

I've shared these findings with the concerned team for further review and will keep you updated through this ticket.

regards,
Waqar

#2151169

Hi Waqar,

Thank you for your reply.
I hope the limitation will be corrected in a future update.

Best regards

#2151465

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for bringing this forward and I'll keep you updated on the progress.

#2162717

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for waiting and I've heard back from the concerned team.

In order to show the translated alt text for the images used in the slider, you'll need to make sure that they are translated at the product post level. Translating the images globally through media translation, won't be enough.

1. Please go to WP Admin -> WPML -> Settings and under "Custom Fields Translation", make sure that the image field that you're using for the slider is set to "Translate".

2. Next, go to the edit screen of the product post (in primary language) and translate it again. You'll see the option to translate the alt text for each image added in that custom field too.

Once, you've translated the images on the product level, the translated alt text will start showing in the image slider too.

I hope this helps and let me know how it goes.

#2165533
product-translation-avalaible-fields.png
wpml-settings-custom-fields-transaltion.png

Hello Waqar,

Thank you for your feedback.

I've checked again my configuration and it seems to be in accordance with your recommendations.
However, I do not have at my disposal a field to translate the alt text.
Only one field to change (translate) the url of each image in the gallery.

Regards

#2167655

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for writing back.

Can you please share temporary admin login details, along with the link to an example post edit screen?

Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.

#2168641

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for sharing the admin access.

I checked the translation editor from the single product post edit screen and I do see the fields for title and alt text of images, under the "Media" heading.
( screenshot: hidden link )

There are a number of updates pending for Toolset and WPML plugins too. Please make sure that all plugins are also updated to the latest versions.

#2169181
product-page-in-french-1.png
product-page-in-french-2.png
product-page-in-english-1.png
product-page-in-english-2.png

Hi Waqar,

Thank you for your reply.

Yes, but in the front-end code the alt text is in English whatever the language of the site.

You can check it on the production site where all plugins are up to date: hidden link

Regards

#2169915

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Would it be possible for you to share a clone/snapshot from the production website?
( ref: https://toolset.com/faq/provide-supporters-copy-site/ )

This will help in investigating this on a different server, without affecting the actual website.

I've set your next reply as private, again.

#2174679

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for sharing the duplicator package.

During troubleshooting, I noticed that the issue persists on your website, even if everything is updated, the theme is switched to default Twenty Twenty One and all extra plugins ( other than WPML and Toolset ) are disabled.

Since, this is not reproducible on clean/new websites, I've shared these findings as a special case, to the concerned team for further investigation.

I'll keep you updated on this ticket and thank you for your patience.