GUID to related post not in current language

I'm having problems with related posts and the link to them. I'm using the plugin Posts 2 Posts to create connections between posts.

I also have three languages in wordpress website (french, english, dutch).

I can get the related news articles by creating this query:

$connected = new WP_Query( array(
                    'connected_type' = 'project_to_post',
                    'connected_items' = $post,
                    'posts_per_page' = 3
                ) );

I get one news item (that's correct) and the title, body, ... are all in the correct language (dutch in this case). But the problem is the guid url. This is the url:

http://mydomain.be/en/?p=1771

It's a link to the english post instead of the dutch version of the post. The news article is fully translated in all the languages ... .

What could be the problem here?

UPDATE:
My post looks like this:

object(WP_Post)#4953 (28) {
["ID"]=
int(1771)
["post_author"]=
string(1) "1"
["post_date"]=
string(19) "2015-04-04 20:39:54"
["post_date_gmt"]=
string(19) "2015-04-04 20:39:54"
["post_content"]=
string(1600) "Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Aenean lacinia bibendum nulla sed consectetur. Curabitur blandit tempus porttitor. Integer posuere erat a ante venenatis dapibus posuere velit aliquet.
Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec sed odio dui. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum."
["post_title"]=
string(47) "meiboom geplaatst op nieuwe ziekenhuis az delta"
["post_excerpt"]=
string(0) ""
["post_status"]=
string(7) "publish"
["comment_status"]=
string(6) "closed"
["ping_status"]=
string(4) "open"
["post_password"]=
string(0) ""
["post_name"]=
string(44) "maypole-placed-on-new-general-hospital-delta"
["to_ping"]=
string(0) ""
["pinged"]=
string(0) ""
["post_modified"]=
string(19) "2015-06-18 16:58:43"
["post_modified_gmt"]=
string(19) "2015-06-18 16:58:43"
["post_content_filtered"]=
string(0) ""
["post_parent"]=
int(0)
["guid"]=
string(36) "http://mydomain.be/en/?p=1771"
["menu_order"]=
int(0)
["post_type"]=
string(4) "post"
["post_mime_type"]=
string(0) ""
["comment_count"]=
string(1) "0"
["filter"]=
string(3) "raw"
["p2p_id"]=
string(4) "1262"
["p2p_from"]=
string(3) "172"
["p2p_to"]=
string(4) "1771"
["p2p_type"]=
string(15) "project_to_post"

Topic localization language guids wp-query posts Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.