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

Last updated by felixB-4 1 year ago.

Assigned support staff: Yvette.

Author Posts
October 9, 2018 at 3:26 pm #2800827

felixB-4

In my view there are two ways, how to translate media files with WPML and Elementor.

1. Using the Media Translation Plugin

2. Make a copy of the page, open the translated page with Elementor and change the Image there.

What is the better approach?

October 10, 2018 at 8:16 am #2803341

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

It really depends on if you are going to have different texts related to each image version.
e.g. will you have different captions? descriptions? alt-texts?

If you only plan to have an image (no langauge-specific texts) then you do not need the Media Tranlsation plugin.

However, you ALWAYS will need to execute the WPML -> Settings -> Media translation -> "Start" button and set the option for new media to be duplicated.

Media Transaltion is they way to assing different texts per language to existing duplicated media.

I hope this helps answer your question.

October 11, 2018 at 3:11 pm #2808849

felixB-4

Dear Yvette,

I installed the Media Tranlsation plugin, but it seems not to work with Elementor.

If I have an image widget in Elementor and translate it's image with Media translation, nothing changes on the translated page.

How does the translation of an image in the image widget work?

Best
Felix

October 12, 2018 at 1:53 pm #2812229

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Ususally, for an image widget, you would need to update the image-id in the translated post to point to the correct language version of the image.

This might be easier to understand/explain if you provide a concrete example.

If the image-id is not a field that is appearing in the translation editor to change, then you have two choices:
- add the required XML in WPML -> Settings -> Custom XML Configuration (I can help with this if it is possible)
- use the standard WordPress editor to update this image id manually.

October 12, 2018 at 4:35 pm #2812629

felixB-4

The image-ID is not appearing, so we have to try one of your two ways.

What do you mean with "standard wordpress editor", the "Classic Translation Editor " ?

----
To be honest, this seems super complicated, just for translating an image what is the core feature after translating text in my opinion 🙁

October 12, 2018 at 4:42 pm #2812648

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

1. IMage translation v. Element with image transaltion
The issue is that you are not translating the image..you are translating a pagebuilder element /image widget which is *pointing* to an image. It´s a subtle difference but an important one.

Specifically, you need to translate the attribute value for the image id of that particular widget. So, it really has nothing to do with translating the actual image

2. Native wordpress editor
No. It is not the Classic Translation Editor. Choose the option:
WPML -> Settings -> How to translate posts and pages -> Create translations manually

October 12, 2018 at 4:58 pm #2812686

felixB-4

1. Yes I understand this. Thought maybe this can be solved with the Media Translate Plugin.

2. Ok, since we have only 2 languages this maybe the better approach for us. With more languages it will be lot of work if we change stylings or add widgets. After the initial copy of a page we have to make the same changes on every pages.

October 12, 2018 at 5:04 pm #2812737

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

1. It would do so for certain custom fields like standard featured image...and even the standard wordpress gallery.

It will also do the automatic substitution for Woocommerce products..but this is thanks to the bridge plugin WCML. With pagebuilder elements, this is not happening "automatically". That particular element attribute has to be translated either in the Transation Editor or manually.

2. OK.

Does this resolve your issue?

October 12, 2018 at 5:11 pm #2812745

felixB-4

1. Ok

2. Yes

Idea: It would be super cool and easy, if in the Classic Translation Editor the URL of the image would be shown, so you could change the URL manually to the translated image 🙂

October 12, 2018 at 6:34 pm #2812936

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

2. You wrote: ".. It would be super cool and easy, if in the Classic Translation Editor the URL of the image would be shown, so you could change the URL manually to the translated image.."

In theory, this is what happens when you add the required XML for the widget but you get the object id and not the URL....almost but not quite - right?

October 12, 2018 at 6:39 pm #2812940

felixB-4

Ah ok, to understand: Would I have to change the required XML for every image, or does the XML add a object id field to the Translation editor for all future images? In this case it would be super you could tell me what XML I have to use, and how I get the object id of an image widget:)

October 13, 2018 at 12:35 pm #2814114

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hello

1. You asked: "..Would I have to change the required XML for every image, or does the XML add a object id field to the Translation editor for all future images?."

Answer: You add one XML tag for all future image ids. The tag allows the Tranlsation Editor to recognise, parse and present the contents of the element to you for translation within the translation editor.

2. Required XML
As you are using Elementor the steps are a bit different than for other pagebuilders. Here is the list of elements that are currently supported:
https://wpml.org/documentation/plugins-compatibility/elementor/#List-of-the-translatable-Elementor-Elements

If you find that you are using an element that is NOT on this list, the instructions on how to add support for it is here:
https://wpml.org/documentation/plugins-compatibility/elementor/how-to-add-wpml-support-to-custom-elementor-widgets/

So, first step is to look at if the element you are trying to translate is on the supported list or not. And if it is not, decide if you want to go through the effort of adding support for the custom element you are using.

Kind regards

October 21, 2018 at 4:11 pm #2835708

felixB-4

I tried XML but its much to complicated and not really comfortable. So I changed all all image elements to textfields with an image in it. So its saey to changethe Image-URL to the translated image..