We have just released WPML 4.3.3. Before reporting issues please make sure to update - this version resolves all known issues with the major WPML 4.3 release

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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 6 replies, has 2 voices.

Last updated by reneeF-2 1 year, 1 month ago.

Assigned support staff: Bruno.

Author Posts
September 29, 2018 at 9:06 pm

reneeF-2

I am trying to: translate the medias on our website (From French to English). I'm using Elementor Pro.

Link to a page where the issue can be seen: I work on a local site, but this problem happens in other websites too.

I expected to see: the translated image should be shown, not the orginal image.

Instead, I got: the original French image.

I thinkk it's a bug in WPML (probably a compatibility issue with Elementor) because I found a workaround. If I put the image in a "text edit widget" instead of an "image widget" AND if I set a custom size for the image, the translated media show up. So maybe WPML doesn't detect the image url in an image widget?

On this image, you see that the upper image is in an image widget (not translated), the second image is in a text widget (translated).

October 2, 2018 at 1:52 am #2779745

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Thank you for contacting us.

From what I've noticed in your Duplicator package, you're using the same image in WPML > Media translations.

Please, could you add the image in English and then sync the content to see if it will work?

Thank you.

October 2, 2018 at 4:45 am #2780317

reneeF-2

Thanks for the reply.

I don't understand what you mean. I'm not using the same image, I've set an English version of the French image (the difference is only the dates). The proof is that it works. The translated images is shown for the image put in the text widget, as you can see in the screenshot in my previous image.

If you can try the Duplicator package, just go on the page "visibilite 2019", you'll see what I mean. One image is correctly translated, the other one isn't, and it's the same image that is used for both widgets. The upper one, the image is placed in an image widget (not working), the lower one is placed in a text edit widget (working).

And again, as I said previously, the only way to make it work in the text widget was to set a custom size for the image. Otherwise, the image in the text widget wouldn't be translated.

Please try it. Or i can make a screencast to show you. Thanks.

October 3, 2018 at 2:23 am #2783273

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Thank you. I saw what you're reporting. I'll test it a little more to know what it can be.

As a workaround, I noticed that in this case, it is necessary to access the page in the secondary language using the language selector at the top and then edit using the Elementor to add the image in the secondary language as well.

Please, could you test and verify if this works?

Thank you.

October 3, 2018 at 1:39 pm #2784723

reneeF-2

Hi Bruno, yes, I tried it. Yes, it works, but that's not a viable solution because we use the translation manager. If we use the translation manager after modifying the translated page directly, it overwrites the changes.

We need to use the translation manager, because on pages with complex layout, it becomes impossible to manage the changes in two languages.

I tried with other widgets (Call to action), and the image isn't translated. It looks like WPML doesn't detect the media in the widgets, except in the text edit widget.

By the way, this problem with media translation is the same on my other websites.

October 4, 2018 at 12:46 am #2785968

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

Thank you. This seems to be a compatibility issue. As a workaround, please follow the steps below:

- Open the file wp-content/plugins/elementor/includes/widgets/image.php
- On line 526, insert the line:

$settings['image']['id'] = apply_filters('wpml_object_id', $settings['image']['id'], 'attachment');

- This line should be below of the line $settings = $this->get_settings_for_display();

Please, note that our team is aware of this issue and will contact the Elementor team to resolve this natively in the code.

Please, let me know if I can help with any other questions you may have. I'll be happy to help.

Thank you.

October 4, 2018 at 4:38 am #2786426

reneeF-2

Wow, that's great! Really happy that the media translation works! Looking forward for the official fix from Elementor. Thanks a lot!