Change logo for each language with mQtranslate

Written By :

Category :

fedora

,

General

,

guias

,

Linux

,

Wordpress

Posted On :

Share This :

And yes… again with mQtranslate, but with every new thing I find on the way, I like to post it so I don’t forget it. This time, I needed to add a different logo for each language activated at mQtranslate, at least this was a curious thing this client asked me… you too? This tutorial is much simpler than the previous one about mQtranslate, you just need to add the next lines to your header where the logo line is:
<?php if(qtrans_getLanguage() == ‘eu’){ echo ‘<a href=”#top”><img src=”/wp-content/uploads/2014/06/eu-logo-eu.png”></a>’; } if(qtrans_getLanguage() == ‘es’){ echo ‘<a href=”#top”><img src=”/wp-content/uploads/2014/06/logo-europa.png”></a>’; } ?>
And presto… you’re done! I upload this imaes to the same wordpress media manager since some clients don’t let you use ssh or ftp (thx god wasn’t the case) so you need to figure out a solution. Once you upload the logos, et the url and remove the domain, keeping the rest; and that’s the path you will need.
logos
I know this is a simple tutorial, but I’m 100% sure that I will forget how to do it, so adding it here will remain as a digital post-it!