WPML best page selector with php

This code returns the post ID in the current language.

$translated_post_id = apply_filters( 'wpml_object_id', $post_id, 'post' );

So, you can use $translated_post_id in is_page.

Documentation.

 

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)