Before you ask please READ THIS

Change header logo according to the language / WPML

in Starter Posts: 10
Hello again! :)

The company for which we build a site has a logo that changes depending on whether the language is French or English.

Currently in Appearance → Customize section, the settings are for all languages.

Is there a way to translate the different versions of the header logo?

To see the Website:

http://navanex.audace.qc.ca/

Navanex / Ch@ntierN4val

Regards,

Mario

Comments

  • AirAir
    Posts: 10,056
    Hey :-)

    In your case, you will have to replace 2 images: for light variant logo and for the sticky variant logo.

    You can use custom CSS for this. Let's switch images only in case of the French language. Please add such custom CSS:
    html[lang="fr-FR"] a.sticky-logo{
    	background-image: url(http://192.168.1.2/wordpress/fatmoon/wp-content/uploads/sites/4/2016/02/logo.png);
    }
    html[lang="fr-FR"] a.light-logo{
    	background-image: url(http://192.168.1.2/wordpress/fatmoon/wp-content/uploads/sites/4/2016/02/logo.png);
    }
    Best to use the same proportion logo image in this case.

    With kind regards.


  • Posts: 10
    Hello,

    Good! It's works by using custom CSS (rather than additional CSS)!

    How to change the version for high resolution screen? Can I add a CSS with a link to the larger image?

    Many thanks to you and best regards!

    Mario
  • AirAir
    Posts: 10,056
    Sure you can. Please use such custom CSS for High DPI screens:
    @media print,
    only screen and (-o-min-device-pixel-ratio: 5/4),
    only screen and (-webkit-min-device-pixel-ratio: 1.25),
    only screen and (min-resolution: 120dpi) {
    	html[lang="fr-FR"] a.sticky-logo{
    		background-image: url(http://192.168.1.2/wordpress/fatmoon/wp-content/uploads/sites/4/2016/02/logo.png);
    	}
    	html[lang="fr-FR"] a.light-logo{
    		background-image: url(http://192.168.1.2/wordpress/fatmoon/wp-content/uploads/sites/4/2016/02/logo.png);
    	}
    }
    With kind regards.
  • Posts: 10
    Hello,

    I canno't test at this time but it's sound like good! :)

    Many thanks to you!

    Bests regards,

    Mario
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion