Jump to content

Optimising the Manual Language Switcher

Recommended Posts

Hello!

I have built a bilingual website (Traditional Chinese - English) following the tutorial by Brad Good, it seems to be working fine.

The only problem I am facing now is that the language switcher (top right corner) does look a bit strange as it floats in the air and is not within the navigation menu. Is there a way to include it as one of the element in navigation menu (for both desktop and mobile)? Thank you!

My site:
https://caper-grouse-df3p.squarespace.com/
pw: goodgood

Link to comment
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

In your Code Injection code, find this code

image.thumb.png.f20b715fff96e32dbcebfadac7b65819.png

change it to

/* SETUP LANGUAGE SWITCHER */
    $('.header-nav-wrapper').prepend('<div class="language"><a href="/zh/home" class="lang-zh"><span style="font-size:12pt;"></span></a> <a href="/en/home/" class="lang-en"><span style="font-size:12pt;">En</span></a></div>');

then add this to Website > Website Tools > Custom CSS

/* Desktop Language Position */
.language {
    position: static !important;
    margin-left: 2.5vw;
}
.header-nav-wrapper {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
}

image.thumb.png.718bb2db42a9e7d67a81f5e8871f0c23.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.