<?php if ( ICL_LANGUAGE_CODE=='it' ) : ?>
	Your Tag
	<?php Your Code ?>
<?php endif; ?>
<?php if ( ICL_LANGUAGE_CODE=='fr' ) : ?>
	Your Tag
	<?php Your Code ?>
<?php endif; ?>
<?php if ( defined( 'ICL_LANGUAGE_CODE' ) && 'fr' == ICL_LANGUAGE_CODE ) { // If the language is French ?>
	<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/images/fr_logo.png" class="site-logo" alt="" />
<?php } elseif( defined( 'ICL_LANGUAGE_CODE' ) && 'it' == ICL_LANGUAGE_CODE ) { // If the language is Italian ?>
	<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/images/it_logo.png" class="site-logo" alt="" />
<?php } else { // If the language is English, the default ?>
	<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/images/en_logo.png" class="site-logo" alt="" />
<?php } ?>

 

bavotasan.com | Displaying Different Logos with WPML (ICL_LANGUAGE_CODE) : https://bavotasan.com/2016/displaying-different-logos-wpml/
- WPML | Change logo per language (ICL_LANGUAGE_CODE) : https://wpml.org/forums/topic/change-logo-per-language/
- WPML | logo in different language (ICL_LANGUAGE_CODE) : https://wpml.org/forums/topic/logo-in-different-language/
- WPML | how to get different headers with different languages (ICL_LANGUAGE_CODE, language_attributes()) : https://wpml.org/forums/topic/how-to-get-different-headers-with-different-languages/
- WordPress Codex | Function Reference/language attributes : https://codex.wordpress.org/Function_Reference/language_attributes
- WordPress Developer Resources | Function | get_language_attributes() : https://developer.wordpress.org/reference/functions/get_language_attributes/
- WordPress Developer Resources | Function | get_bloginfo() : https://developer.wordpress.org/reference/functions/get_bloginfo/

 

- Language : en-US, ko-KR

Posted by cpu21