change image based on language
-
Hi there thanks for your awesome plugin. i need your help . i can not set option in template for image based on language.
i try this way
<img src=”<?php echo get_template_directory_uri(); ?>
<?php if ( qtrans_getLanguage() == “pt” ){
echo ‘/images/logo-dpa-284.png’ ?>
<?php } else if ( qtrans_getLanguage() == “en” ){
echo ‘/images/logo-oh.png’ ?><?php } ?> ” alt=”location”>and this way
<?php
if ( qtrans_getLanguage() == ‘en’ ) {
<img src=”https://www.cunhapontes.adv.br/wp-content/themes/cunhapontes/img/location_eng.png” alt=”” />
}
elseif ( qtrans_getLanguage() == ‘es’ ) {
<img src=”https://www.cunhapontes.adv.br/wp-content/themes/cunhapontes/img/location_es.png” alt=”” />
}
elseif ( qtrans_getLanguage() == ‘pt’ ) {
<img src=”https://www.cunhapontes.adv.br/wp-content/themes/cunhapontes/img/locatcontato.png” alt=”” />}
?>
- The topic ‘change image based on language’ is closed to new replies.