Reply To: Site Identity and WPML

Home Forums Support Site Identity and WPML Reply To: Site Identity and WPML

Lead Developer
Lead Developer

Hmm, I think you would need to use GP Hooks and not the logo uploader in the Customizer.

According to WPML, you can use PHP to see which language is being set.

For example, you would add this into the Before Header Content hook:

<?php if ( ICL_LANGUAGE_CODE == 'en' ) { ?>
    <img src="URL TO ENGLISH LOGO" alt="" />
<?php } elseif ( ICL_LANGUAGE_CODE == 'ja' ) { ?>
    <img src="URL TO JAPANESE LOGO" alt="" />
<?php } else { ?>
    <img src="URL TO LOGO IF NO LANGUAGE IS DEFINED" alt="" />

<?php } ?>

Then make sure you check the “Execute PHP” checkbox.

I found these definitions here: