Jump to content

Bi-lingual website. Hamburger menu, need code so different fonts are used depending on language

Recommended Posts

Bi-lingual website. Mobile view, Hamburger menu, need help so different font is used depending on the language one is visiting the website.

Currently, it uses the same font for both languages (Thai & Eng), so it looks weird in the hamburger menu since one language will always look awful as the font doesn't fit well. Been able to add customized font to the rest of the content on the website but stuck now.

So I want one font to be used for Thai
and
another font for Eng

Website:

https://www.goonchan.com/

https://goonchan.squarespace.com/

Please help 🙂

Link to comment
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Hi,

EN is /en

and Thai is /es

If that is right, you can edit this code

image.thumb.png.8cc547d98fdfa23bfba4c3ef9befd0e5.png

to this

 /* HOMEPAGE-LOGO LINKS TO PROPER LANGUAGE HOMEPAGE */
  if (lang == "es") {
    $('a[href="/"]').attr("href", "/es/home/");
	$('body').addClass('thai-font');
  }

Next, add this code to Design > Custom CSS

@font-face {
	font-family: Thai-Font;
	src: url(upload font & paste font file url here);
}
body.thai-font * {
	font-family: Thai-Font !important;
}

The code will change all elements on Thai (/es) pages to monospace font.

If you want to use custom font, use this code

 

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.