fbpx
Skip to content
Questions & AnswersCategory: QuestionsHow to change banner image with language change?
Daniel asked 8 years ago
Hi! I'm using the multilingualizer on Squarespace and, thus far it's been working marvelously! I have a question regarding the banner images. I would like them to change according to the language selected. How can this be done?    
2 Answers
Dave Hilditch Staff answered 8 years ago

Hi – it depends on how this banner image is loaded. If the banner image is set using CSS – e.g. the background-image property, then you can set the different images for each language using CSS.
For your first language, the body element gets an additional class of language0.
So, if your banner image has the id of #banner and uses the background-image property then CSS like this would work:

body.language0 #banner {background-image:url(englishbanner.png);}
body.language1 #banner {background-image:url(frenchbanner.png);}
Daniel replied 8 years ago

Hi Dave,

Thanks for the quick reply! Being unfamiliar with using CSS, I set it using squarespace’s standard upload banner form. But then I suppose it’s impossible since you only upload one image… What would be the CSS for setting the banner like you suggested? And would that work for mobile screens as well?
Regards
Daniel

Dave Hilditch replied 8 years ago

Post a link to your site so I can see

Daniel replied 8 years ago

Hi,

here is a link!

https://daniel-pettersson.squarespace.com/

Question 2: On the cover page I have buttons for language selection. How do I get them to work?

Thank you,

Daniel

Dave Hilditch Staff answered 8 years ago

Check the troubleshooting guide here: https://www.multilingualizer.com/support/
It includes details about what you need to do to get Cover Pages to work. Basically, Squarespace treats them almost as a separate website so code injection is not applied but you can hit the cogwheel on the cover page and insert the code there too.

Daniel replied 8 years ago

Thank you,

I got the cover page to work. But my first question remains. How do I make it so that the banner I use on the index page changes with the language selection.

We use cookies

We use cookies for various things on our site, including our on-site chat bubble (if you use it), our comment forms (if you use them) and for session handling (if you log in).

Other than that, we use cookies to identify where traffic came from to help us understand which traffic turns into sales, we use a cookie for Google Analytics traffic analysis and we use a cookie to customise adverts for our own products we think you'll be interested in.

You can read more detail in our privacy policy page. Please click 'Accept' or 'Decline' to continue.