Skip Navigation

[Closed] image gallery won't translate with wpml

This support ticket is created 4 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 6 replies, has 2 voices.

Last updated by Jamal 4 years, 7 months ago.

Assisted by: Jamal.

Author
Posts
#1612833

With Toolset, I have created a Custom Post Type called Projects
In Custom fields, I have an image field with allow multiple instances, to create an image gallery.
I have uploaded images in this gallery with title, description, caption, in English.
This appears on the homepage and works
hidden link
I translated the medias
On the French side, the right images appear, but text is still in English...

I have the same problem on other pages like
hidden link
where some images are in french, some in english, no matter what language you are in

What I tried already:
- I translated the images in media. In Settings > Media translation I have everything ticked and pressed "Start".
- In Settings > In Custom Fields Translation, I have the wpcf-gallery-for-project set as translatable.
- In String translations: these texts do not appear
- Went to admin translation, ticked a few boxes, still won't appear in string translations

And If I go straight to the french page (bypassing wpml), change page, update, it comes out ok in French. But then, I got to english, update, and the french reverts back to untranslated version.

I read about media not being uploaded in the right language. I deleted medias, reuploaded in English with english text, then translated media in French: it does not work. Still shows up in English.

I am at lost as to how to configure this properly and make it work. Been trying to fix it for 3 days.

#1613617

Hello and thank you for contacting the Toolset support.

I visited the translated pages and I could not find an image that has text in English. Everything seems translated to me.
- hidden link
- hidden link

Can you elaborate more on the issue? What image on what page?

I might need to take a closer look, would you allow me temporary access to the backend? Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **

#1613857

Hi Jamal,
The Home page I managed to fix, but now if user changes something and saves, I breaks all translations again.

Custom Post Type = Projects
Let's take Subway truck as an example
hidden link

In Field group for Projects, I have a section called Gallery for Projects made with Toolset
User can enter any number of images.
Now, it seems entering the Name / caption / Alt text and description in the admin does not work?

So in media Library, images have descriptive text there (Name / caption / Alt text / description)
They were a few old images in Library, I deleted them
(note that "Delete translation as well" is ticked in WPML Settings)
But when I go to WPML media translation, they are still there.
Plus, some are marked as French, when they were all uploaded as English.

In media translation, I change the text only (I use the same image for French).
Then in Project, I create translation to French (classic editor).
Problem (with WPML):
- I still see fields for SEOpress (plugin that I deleted and replaced with Yoast)
- On other websites I built with WPML, I still see old pictures in this section that were deleted from medias long ago and that are not used in the page anymore.

Now the images and Name / caption / Alt text / description translated appear there, seem ok. I tick translated and save.

Now when I switch to French page on website, I expect to see images French description (hover on the pictures) but they are still in English.
hidden link

In WPML Settings, I tried changing Projects from Translatable - use translation if available or fallback to default language to Translatable - only show translated items, does not work. Translatable is ticked in admin page.

I do not know if the problem comes from Toolset, WPML, or even Elementor.
I can give you wordpress access, but to which email? I have a backup, but I cannot do a duplicate right now.

#1613939

You can create any user, and add it to your next reply which will be private. But I'll need it to be admin. My email is jamal.b(at)onthegosystems.com

I'll first check the issue with the images texts translation, once we get is solved, we can work on another issue.

#1614175

From what I gathered so far, the images are displayed in an Elementor Pro gallery. Check this screenshot hidden link

It may be caused by a compatibility bug between Elementor Pro and WPML. To confirm that, please perform the following tests:
1. Create an Elementor Page/Post that has a gallery that does not pull images from a Toolset custom field. Translate the page and check if presents the same issue.
2. Create a custom post type with a gallery custom field. Use a content template to display the post instead of an Elementor Pro Single template. Translate the post and check if the issue persists.

If the test(1) presents the issue, we may say, that this is a compatibility bug between Elementor Pro and WPML.
If the test(2) presents the issue, we may say, that this a bug between Toolset and WPML.

When this is done, I might need to take a copy of your website to further investigate this, would you be ok?

Let me know what you will get for the tests.

#1615763

test(1) presents the issue - you are right - it does look like between WPML and Elementor
However,
If I go in WP > Pages > a project in English, I see the gallery field that was created with Toolset, as well as other custom fields.
If I go in WP > switch admin to French > a project, gallery does NOT appear, neither do other custom fields.
Normal behavior?
Because with this bug, I have to go manually on the french side and change things, but the fields are just not there.
Note that in WPML, gallery is set to translatable.

#1616673

I am not sure why the gallery do not appear when you switch to French. Maybe this is expected, I'll need to perform some debugging before telling.

On the other hand, if a static Elementor Gallery presents the issue, maybe that widget needs some custom integration code with WPML. Check this article https://wpml.org/documentation/plugins-compatibility/elementor/how-to-add-wpml-support-to-custom-elementor-widgets/

I will need to debug this further. Would you allow me to take a copy of your website, using Duplicator or another plugin?

The topic ‘[Closed] image gallery won't translate with wpml’ is closed to new replies.