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

Last updated by Yvette 5 months, 3 weeks ago.

Assigned support staff: Yvette.

Author Posts
April 25, 2019 at 7:09 am #3679391

carecweb

Hello WPML Support,

I would like to clarify how the bulk processing of Media Translation works.

As I have mentioned in my other just-opened ticket, performing the Media Translation for existing media takes too long for thousands of media and multiple languages. During that time, the pc/browser where it happens also has to be open.

My Questions:

1) What happens if the processing was not finished (e.g. pc or browser closed, server down)? Can the process be restarted safely?

2) Even if the whole process was successfully completed, along the way, what happens if the same process was intentionally or accidentally restarted? Are entries duplicated? Are old entries erased and then reinserted? Are only the newer entries (assuming the options/checkboxes below for new media are no specified, or wpml deactivated during that time) processed while the old ones left alone?

3) Is my assumption correct that you have to rerun the process when a new language is added? What if an existing language is removed? Do you also rerun? Are media entries for that language deleted from the database?

WPML CMS: 4.0.7
WPML Media: 2.3.7

Thanks in advance

Thanks!

April 25, 2019 at 12:28 pm #3682383

Yvette
Supporter

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

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

Hello

Here are my answers to the best of my knowledge and experience.

1. Can the process be restarted safely?
Normally, yes.

2.Are entries duplicated? Are old entries erased and then reinserted? Are only the newer entries (assuming the options/checkboxes below for new media are no specified, or wpml deactivated during that time) processed while the old ones left alone?

You normally only run the "WPML Media Tranlsation" once. Here is a high-level overview of what happens in the 4 steps of the process:
2.1. Assign language info
This will add any post-types present in "wp-posts" to the table to the table "icl_translations" assigning it the system default language.
Once you run this, you cannot select it again - so no danger in running this too many times.

2.2. Translate media
This will create duplicate entries in the "icl_translations" *and* "wp-posts" tables for each media post and each language. It essentially creates the Media Library in each language.

Again, if language versions already exist in each language, executing this again does not create more language versions of the image. i.e. You will not keep increasing the size of your Media Library. But yes, if you add a new language, the process will add versions for that language (i.e. it will create the Media Librar for that language)

2.3. Duplicate existing_media
This will insert a custom field in the postmeta for each existing post/page post type:
_wpml_media_duplicate

This is only inserted once. It has the value of "0" or "1" and controls whether "attachment " post types related to this post are duplicated to translated versions of the post

If the custom field is already there, that postmeta is skipped.

2.4. Duplicate existing featured
This will insert a custom field in the postmeta for each existing post/page post type:
_wpml_media_featured

This is only inserted once. It has the value of "0" or "1" and controls whether "the featured image of the post is duplciated to a translated languages

If the custom field is already there, that postmeta is skipped.

3. You asked: "Is my assumption correct that you have to rerun the process when a new language is added? What if an existing language is removed? Do you also rerun? Are media entries for that language deleted from the database?"

Your assumption is correct. Enabling a language will not automatically launch the media duplication (e.g you will not automatically see a Media Libraray of images in the new langauge).
To create it, you would only select the 2nd checkbox of the "Media Translation" process and select the "Start" button.

Also, as a general rule, when you delete/disable a language, the associated posttypes are not removed. You are required to first remove content in that language (including media post types) before disabling a language.

Have I been able to answer your questions?

April 29, 2019 at 7:13 am #3700437

carecweb

Hello Yvette. Thanks for handling my issue. I'm happy to see you're still there. Can you keep this issue open while I try to understand your answers better and continue peeking at the database to see how things jibe?

April 29, 2019 at 10:12 am #3702017

Yvette
Supporter

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

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

I´m happy to see I´m still here too = )

The ticket should remain open at least a week until you decide to close it. Just write back when you want.

The topic ‘[Closed] Restarting or Redoing Media Translation’ is closed to new replies.