Using if statement with WPML

This a code for displaying code according to the current language

in this example i check also if the page is front page of the site

<?php if ( is_front_page() && ICL_LANGUAGE_CODE=='en' ) : ?>
<?php putRevSlider("home-en") ?>
<?php endif; ?>
<?php if ( is_front_page() && ICL_LANGUAGE_CODE=='ar' ) : ?>
<?php putRevSlider("home-ar") ?>
<?php endif; ?>

Turn ACF(Advanced Custom Fields) compatible with qTranslate

Today i was fighting ACF Advanced Custom Fields to work with qTranslate at all and after couple of hours i found the solution

just add this code in the function.php of the theme

add_filter('acf/format_value_for_api', 'theme_format_value_for_api');
function theme_format_value_for_api($value) {
return is_string($value) ? __($value) : $value;

and then in the custom field add [:en] the text in english [:ar] the text in arabic

and it will work fine

here is the site i was working on