Title: Compatible with WPML plugin?
Last modified: August 30, 2016

---

# Compatible with WPML plugin?

 *  Resolved [lgustaw](https://wordpress.org/support/users/lgustaw/)
 * (@lgustaw)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/compatible-with-wpml-plugin/)
 * 1. Is the plug is compatible with WPML? Do you correctly copy language version
   of posts / pages?
    2. If so, or if you add it, you can apply for promotion of
   the plugin on WPML site. [https://wpml.org/documentation/theme-compatibility/go-global-program/](https://wpml.org/documentation/theme-compatibility/go-global-program/)
 * [https://wordpress.org/plugins/duplicate-post/](https://wordpress.org/plugins/duplicate-post/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Enrico Battocchi](https://wordpress.org/support/users/lopo/)
 * (@lopo)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/compatible-with-wpml-plugin/#post-6721574)
 * Hi,
    it’s not compatible yet, thanks for the suggestion, I’ll try to apply.
 *  [eizymeizy_0809](https://wordpress.org/support/users/eizymeizy_0809/)
 * (@eizymeizy_0809)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/compatible-with-wpml-plugin/#post-6721596)
 * It would be great if this was compatible with WPML since all our posts are in
   multiple languages.
 *  [Jonas Lundman](https://wordpress.org/support/users/jonas-lundman/)
 * (@jonas-lundman)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/compatible-with-wpml-plugin/#post-6721598)
 * Plugin Author:
 * As a good start, In case of WPML compatible workspace something like this should
   do the trick to reach all siblings WPML/ Translated posts and do whatever your
   plugin in does with the original post.
 * First call, check if there is translations, just a root function example for 
   the second function below:
 *     ```
       function ua_wpml_clone stuff($post_id){
          $translated_ids = ua_wpml_get_translated_ids($post_id);
          if(!isset($translated_ids[0])){
             // No translations;
          } else {
             // Loop the $translated_ids and clone each of them
          }
       }
       ```
   
 * The WPML check function:
 * REMARK, You must pass post_type, and the post_type name, in this example a Woocommerce
   product is in use, and pasted directly into the function (`'post_product'` and`'
   product'`) for easier understanding this “`$trid`” is in use.
 *     ```
       function ua_wpml_get_translated_ids($post_id){
   
       	global $sitepress;
       	$translated_ids = Array();
       	if(!isset($sitepress)) return $translated_ids;
   
       	$trid = $sitepress->get_element_trid($post_id, 'post_product');
       	$translations = $sitepress->get_element_translations($trid, 'product');
       	foreach( $translations as $lang=>$translation){
       		$translated_ids[] = $translation->element_id;
       	}
       	return $translated_ids;
       }
       ```
   
 * Hope this is a good start. Great if your plugin would be WPML friendly!
 *  [unlambda](https://wordpress.org/support/users/unlambda/)
 * (@unlambda)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/compatible-with-wpml-plugin/#post-6721599)
 * Yes, please make it WPML compatible for standart pages and posts.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Compatible with WPML plugin?’ is closed to new replies.

 * ![](https://ps.w.org/duplicate-post/assets/icon-256x256.png?rev=2336666)
 * [Yoast Duplicate Post](https://wordpress.org/plugins/duplicate-post/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/duplicate-post/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/duplicate-post/)
 * [Active Topics](https://wordpress.org/support/plugin/duplicate-post/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/duplicate-post/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/duplicate-post/reviews/)

 * 4 replies
 * 5 participants
 * Last reply from: [unlambda](https://wordpress.org/support/users/unlambda/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/compatible-with-wpml-plugin/#post-6721599)
 * Status: resolved