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.

This topic contains 23 replies, has 2 voices.

Last updated by pascalB-17 1 month, 2 weeks ago.

Assigned support staff: Bigul.

Author Posts
March 27, 2020 at 3:03 pm

pascalB-17

I'm having the following problem: in a page containing an elementor add-on gallery the gallery images are not being translated. Added to this it seems all the images are translated already but in german from german.. this might have happened during install?
Anyways.. I need to be able to have these images files being automatically translated..

March 27, 2020 at 3:39 pm
March 30, 2020 at 7:11 am #5791289

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Welcome to the WPML support forum. I will do my best to help you to resolve the issue.

When we are uploading the media files, WPML Media Translation plugin will automatically duplicate it to secondary language. It will not be a physical duplication. But an extra entry in the database to sync the Media Item between the languages. Please check the following documentation for more details.

https://wpml.org/documentation/getting-started-guide/media-translation/#translation-for-image-captions-and-titles

So the Images captions are not translated to English yet and you want to translate it using Advance Translation Editor, am I right?

Please check the attached images for more details and let me know your feedback.

--
Thanks!

Bigul

March 31, 2020 at 1:33 pm #5804463

pascalB-17

Hi Bigul

Thanks for your reply!
Yes you are right about my inquiry.. but it seems I would still have to manually translate the image captions according to the images you sent? It works fine with other posts/pages - although I still have to open one of the images and make a change to activate the translated images...
In the case of the gallery it seems the images "are translated" but having the same language in the description etc?

Thanks, Pascal

March 31, 2020 at 5:12 pm #5806693

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi Pascal,

Thank you for the updates. Actually those images are not translated to English. They are just duplicated to the secondary language(just an extra entry in the database).

When we are adding an Image to a Post or Page, we can choose it for translation from WPML>>Translation Management Dashboard while sending the Post/Page for translation.

But the Elementor Gallery is an Element and its workflow is different. So I have a request to track the issue. Please try the following steps and check you are getting the expected result or not.

1) Please visit WPML>>Media Translation
2) Find the images with *Feuerwerk: Privatkunde (2019)* and *Raumschiffmodelle: Projekt LOST GOD (2008-2019)*
3) Translate the caption to English
4) Create Page for testing in German
5) Edit it with Elementor
6) Add a Gallery element and insert the *Feuerwerk: Privatkunde (2019)* and *Raumschiffmodelle: Projekt LOST GOD (2008-2019)* images
7) Update the Page
8) Translate it to English and make sure the English captions are showing or not

Please check the attached images for more details and let me know your feedback.

--
Thanks!

Bigul

April 1, 2020 at 8:32 am #5810719

pascalB-17

Hi Bigul

Thanks for your feedback.
I have done as requested. Unfortunately the captions remain in German (I double checked in the media translation to be sure that the english version exists).
I also tried the work around I have been told by another supportet for regular posts containig images (edit english version of image in media translation (add and remove space) > update/save image > WPML shows a message saying that more iages are affiliated to this post > search and replace (option in message) > images now also appear in translated version.
Unfortunately this workaround only works for "regular posts" and doesn't affect the gallery issue.
Please note: it's not a native elementor gallery but rahter a (wpml compatible) addon named livemesh add ons for elementor)
You can see the test page in my portfolios, it's called "test-gallery"

Thanks, Pascal

April 1, 2020 at 8:35 am #5810737

pascalB-17

Here's the link: hidden link
And here are two screen shot of the workaround (which I hope will be resolved one day as well since it's a pain in the ass :))

April 1, 2020 at 1:55 pm #5814013

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi Pascal,

Thank you for the feedback. The image captions are showing for translating in Advance Translation Editor for the hidden link page. But the translation is not showing in the frontend. Please check the attached images.

This may be happening because of the compatibility conflicts. So please allows me to make a duplicator copy of your site using the Duplicator plugin(https://wordpress.org/plugins/duplicator/) for debugging the issue on my local server.

--
Thanks!

Bigul

April 1, 2020 at 1:58 pm #5814069

pascalB-17

Hi Bigul

Thanks for your reply!
And of course.. go ahead and make a duplicator copy.. do you need anything from my side?

Thanks, Pascal

April 1, 2020 at 5:42 pm #5816499

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi Pascal,

Thank you for your permission. I made a copy of the site now, will debug it further and get back to you soon. Please wait.

--
Thanks!

Bigul

April 2, 2020 at 6:14 pm #5825713

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi Pascal,

It is happening because of a conflict with the Gallery Elemetor addon by Livemesh Addons for Elementor. Normally most of the Elemementor Elements will be storing the values in the wp_postmeta table. But Livemesh Addons for Elementor is handling the gallery data with Post contents in wp_posts. So there are some limitations to translate it exactly using WPML Translation Editor.

I am getting the expected result in my local copy after the following steps. Please try it with hidden link translation and check you are getting the expected result or not.

1) Open *Test Gallery* post for edit in German
2) Switch to English via dashboard language switcher
3) Click on *Edit with Elementor* button
4) Clear the Gallery Images
5) Add it again, so it will be showing English captions
6) Update the changes

Please check the attached images for more details. I am checking about this with our compatibility team and get back to you soon.

--
Thanks!

Bigul

April 4, 2020 at 10:22 am
April 4, 2020 at 10:43 am #5837839

pascalB-17

Hi Bigul
Thanks a lot for your tests and your feedback.
I will contact Livemesh as well – as they made their addons compatible with wpml a while ago – seems they forogt about some "details" ... let's hope your compatiblity team can help them to solve the problem!
Thanks Pascal

April 4, 2020 at 12:11 pm #5837973

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi Pascal,

Thank you for the updates. *Livemesh Addons for Elementor* plugin is not listed on the WPML compatibility list for the Plugins - https://wpml.org/documentation/plugins-compatibility and it is not fully compatible with WPML now.

We will get back to you soon when have an update from our compatibility team on this. Please wait.

--
Thanks!

Bigul

April 7, 2020 at 5:47 am #5853699

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi Pascal,

We have a workaround for this issue. The Images translated from WPML>>Media Translation is showing the expected result after adding the following code in functions.php file of the child theme on my local copy. Please check the attached images for more details.

add_filter('lae_post_item_excerpt', 'wpml_fix_translate_caption', 10, 2);

function wpml_fix_translate_caption ($output, $obj) {
	$translated_caption = wp_get_attachment_caption( apply_filters( 'wpml_object_id', $obj->item['item_image']['id'], 'attachment', true) );
	$output = str_replace($obj->item['item_description'], $translated_caption, $output);
	return $output;
}

So please try it after a full site backup and let me know your feedback.

--
Thanks!

Bigul