Home›Support›English Support›[Resolved] Set WPML element translation type from duplicate to translate (API)
[Resolved] Set WPML element translation type from duplicate to translate (API)
This thread is resolved. Here is a description of the problem and solution.
Problem: The client needed to remove the link from duplicated posts in WPML to make them translate independently, similar to the action of clicking the "Translate independently" button. Solution: We advised the client that to remove the duplicate status and make a post translate independently, they should delete the
_icl_lang_duplicate_of
field in the
wp_postmeta
table. This field links a duplicate post to its original. By removing this link, the post becomes an independent translation.
If this solution does not resolve your issue or seems outdated, we recommend opening a new support ticket. We also highly suggest checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. For further assistance, please visit our support forum at WPML Support Forum.
100% of people find this useful.
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.
Since your plugin can't handle importing new translations via WP All import (When not imported parent language), I try to find a way myself.
What I did is duplicating all the posts (products) when there translation_type was set to 0.
My question is how I can remove the link from the duplicate now? It is the same action as clicking the "Translate independently" button (see screenshot). From there, all the translations have an own ID. With this ID I am able to update the translation bulkwise using WP All import.
btw. Why do you not implement a function like this in WP All Import? Now it's not very user friendly as it needs the parent import document.....
If you have a better way of doing this. Please let me know.
Languages: English (English )German (Deutsch )French (Français )
Timezone: Europe/Zagreb (GMT+01:00)
Hi,
Thank you for contacting WPML support!
There has to be a parent import because otherwise it would be impossible for WPML to understand which page is original and what is the translation. Because you need to connect them somehow, as you can easily have a scenario where you have for example 10000 translations, any way other than automatic ( so through original and parent import where you use the unique key to connect them) would be impossible to achieve.
But as for your question of removing duplicate status, does it help if I tell you that there is a _icl_lang_duplicate_of field within wp_postmeta?
Have a look at my screenshots - if you have duplicate with ID 56, it would have _icl_lang_duplicate_of value where the ID of that value is its original, in my case 27.
If you delete _icl_lang_duplicate_of, it would become independent translation.