Title: [Plugin: Widget Entries] WPML Support
Last modified: August 20, 2016

---

# [Plugin: Widget Entries] WPML Support

 *  [htrex](https://wordpress.org/support/users/htrex/)
 * (@htrex)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-widget-entries-wpml-support/)
 * This nice plugin uses a standard taxonomy to implement Widgets editing, so WPML
   is able to translate any Widget post, but adding widgets entries to sidebars 
   only the default language is shown on the front end, the translation doesn’t 
   appear.
 * [http://wordpress.org/extend/plugins/widget-entries/](http://wordpress.org/extend/plugins/widget-entries/)

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

 *  [Jorn Bakhuys](https://wordpress.org/support/users/jornbakhuys/)
 * (@jornbakhuys)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/plugin-widget-entries-wpml-support/#post-3076267)
 * I encountered the same problem, but solved this problem myself.
    Unfortunately
   this means we have to edit the plugin’s code ourself, meaning that with any plugin
   update we have to do it all over again. Let’s hope the Plugin Author will include
   the code in the next update.
 * **Change to be made:**
    Go the the file <your-wordpress-installation>/wp-content/
   plugins/widget-entries/widget-include-post.php
 * Change the following (rule #55):
 *     ```
       if(is_numeric($instance['postwidgetid'])){
       	$content = iinclude_page(intval($instance['postwidgetid']), $params, TRUE);
       }
       ```
   
 * To:
 *     ```
       if(is_numeric($instance['postwidgetid'])){
       	if(function_exists('icl_object_id')) {
       		$translatedid = icl_object_id( $instance['postwidgetid'], 'pt-widget', true );
       	} else {
       		$translatedid = $instance['postwidgetid'];
       	}
       	$content = iinclude_page(intval($translatedid), $params, TRUE);
       }
       ```
   
 * This code will check if there is a translated version of the widget in the current
   language. If not, it will show the widget in the default language.
 *  Thread Starter [htrex](https://wordpress.org/support/users/htrex/)
 * (@htrex)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/plugin-widget-entries-wpml-support/#post-3076268)
 * Great catch jorn!

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

The topic ‘[Plugin: Widget Entries] WPML Support’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/widget-entries.svg)
 * [Widget Entries](https://wordpress.org/plugins/widget-entries/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/widget-entries/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/widget-entries/)
 * [Active Topics](https://wordpress.org/support/plugin/widget-entries/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/widget-entries/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/widget-entries/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [htrex](https://wordpress.org/support/users/htrex/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/plugin-widget-entries-wpml-support/#post-3076268)
 * Status: not resolved