[Resolved] Translate widgets

Home Support English Support [Resolved] Translate widgets

This topic contains 17 replies, has 6 voices, and was last updated by  Anastis Sourgoutsidis 2 months, 2 weeks ago. The support staff assigned to this topic is sarah.n.

Viewing 15 posts - 1 through 15 (of 18 total)
Author Posts
Author Posts
March 4, 2013 at 12:50 pm #108592


I create the following site http://www.hotelalianthos.com/ .
For now they have english and greek version. At the form page, they have 3 widgets, that are pages and posts ( Right now I have the posts : 1.DOUBLE ROOM WITH SEA VIEW 2.THE RESORT 3. RESTAURANT ) The problem is, that, even this posts have Greek tranlate, at the front page, ( index) when I choose Greek languange, the 3 post at the midle of the page, continue with the english language…

Please help, what I must do.

Thank you

March 4, 2013 at 1:23 pm #108611

Forum moderator


This is how widgets are normally translated:

1. If you are using the WordPress default widgets you will be able to translate both the title and content under the "WPML -> String Translation" screen

2. If you are using custom widgets which are coded correctly and use apply_filters on widget_title and widget_text then again you should be able to translate both the title and content under the "WPML ->
String Translation" screen.

Note: If you are coding your own widgets see: Texts in widgets needs to go through 'apply_filters': http://wpml.org/documentation/support/troubleshooting-string-localization/

3. Sometimes the above options are not enough. In this case you may want to look into using Widget Logic see:http://wpml.org/2011/03/howto-display-different-widgets-per-language/

Does this help to point you to the right direction?

March 5, 2013 at 12:54 pm #109015


Hello, I tried everything, but they did not work.
The Theme have own widgets, call it Homepage (att.pdf)

I use Widget logic too, but didn’t work.
Im not sure if the widgets are the problem

If you like I can send you an account so you can Login and see the WPML configurations.

March 6, 2013 at 8:42 am #109332

Forum moderator


Are you using a custom theme that you created or purchased? Do you have a link to the theme's download page?

If the theme is commercial (and I can therefore not download it), can you locate and upload the template file that registers the theme widgets in http://www.pastebin.com/ for me to see?

If that is difficult for you, can you tell me if you are able to activate the same widget more than once in a sidebar (widget ready area)? If not, then this is very likely the problem.

In this case will will need to involve your theme author in making the theme compatible with WPML. What I will need from you is the theme name and contact info (email?) of the author.

March 6, 2013 at 9:05 am #109343


Hello Sarah, thanks for your help.

Please download all the theme form here http://www.hotelalianthos.com/wp_aegean5-v1.4.zip

When you will download it, please informe to delete it.

As I see, in other websites that use the same theme and WPML too, works without problem. You can see example here http://www.villa-tamara.com/

Thank you again


March 6, 2013 at 9:08 am #109345

Forum moderator

Thank you. I have just downloaded it.

March 6, 2013 at 9:23 am #109349

Forum moderator

I have also sent you an email requesting some further information that will help me assist you further.

March 6, 2013 at 10:01 am #109364


Hi everyone,
Just have the same problem using native text wp's widget.
I found in translate strings under wpml>translate strings fields for title and content, i filled up everything per language but nothing append in the frontend.

Is it an wpml issue ?

March 6, 2013 at 12:22 pm #109451

Forum moderator


I received your email, thank you. I have replied to it in order to get the FTp connection corrected. Let me know when that is ready.

@Patrick, can you please open a new ticket for your issue? Thank you!

March 6, 2013 at 3:11 pm #109531

Forum moderator


The problem is indeed a theme incompatibility. To ensure that this theme is made compatible with WPML we need to contact the theme author and work with him on resolving the issue.

Could you please provide a link to your theme's purchase page as well as contact information (email?) to the theme's author so we can contact him?

In the meantime I have modified the function that provides the pages in the select drop-down (widget settings) so that it now lists all pages regardless of language.

This will enable you to activate multiple instance of the same widget in the same sidebar, select the appropriate page and control the widget display using "Widget Logic" – see attached screenshot

The function I modified is wp_dropdown_posts (wp_aegean5-v1.4/panel/generic.php) I have marked my modification with "// WPML Support"

function wp_dropdown_posts($args = '', $name='post_id') {
	$defaults = array(
		'depth' => 0, 
		'post_parent' => 0,
		'selected' => 0, 
		'echo' => 1,
		//'name' => 'page_id', // With this line, get_posts() doesn't work properly. 
		'id' => '',
		'show_option_none' => '', 
		'show_option_no_change' => '',
		'option_none_value' => '', 
		'post_type' => 'post', 
		'post_status' => 'publish',
// WPML Support		
		'posts_per_page' => -1
		//'suppress_filters' => false
//\ WPML Support
March 6, 2013 at 4:27 pm #109570


Thank you to much for your help.

I went to the support forum of Aegean Theme http://www.cssigniter.com/support and I found the following instructions, how to fix this problem.
I dont know, why they did not fix all ready this issue, but as I see, many users, have the same problem, but with this instructions resolve the problem.

I looked to see if they have any contact with the authors of this theme, but the only way is the Support Forum http://www.cssigniter.com/support

Now I will trying to make this changes, and I will inform you about.


WPML translate plugin – CI Page problem


anastis's Profile
Private message

Site Admin
Posts: 2139
Joined: Thu Sep 30, 2010 3:38 pm

so, it turns out page and room ID's needed special attention to be "translated".
I edited widget files ci_widget_page.php and ci_widget_room.php

ci_widget_room.php line 17 was:

Code: Select all
$post_id = $instance['post_id'];

changed it to:

Code: Select all
$post_id = icl_object_id($instance['post_id'], 'room');

and line 57 was:

Code: Select all
'selected' => $post_id,

changed it to:
'selected' => icl_object_id($post_id, 'room'),

Similarly, ci_widget_page.php line 17 was:

Code: Select all
$post_id = $instance['post_id'];

changed it to:

Code: Select all
$post_id = icl_object_id($instance['post_id'], 'page');

and line 52 was:

Code: Select all
'selected' => $ci_post_id,

changed it to:

Code: Select all
'selected' => icl_object_id($ci_post_id, 'page'),

Please note that you'll need to re-save your widgets (preferably using the english version).

Also note that I've changed the Footer Middle widget to be a room, so that the Room widget can be tested.

Feel free to change your passwords if you want. I think i'm finished, unless you have another issue.

Hope this helps someone else too.

March 6, 2013 at 5:06 pm #109587

Forum moderator

This is another possible solution :)

March 6, 2013 at 6:53 pm #109619


Ok, the problem resolved!

Sarah thank you for your help


November 22, 2013 at 8:39 pm #296865


I'm having this problem on the website www.luzsol.com, but I cannot find the "WPML -> String Translation" screen. What am I missing?

November 22, 2013 at 8:41 pm #296866


oh never mind, I just found out when going under "support" that I need to pay another $80 just to translate my plugins… that's pretty lame.

Viewing 15 posts - 1 through 15 (of 18 total)

You must be logged in to reply to this topic.