Jump to content

Change HTML language tag on individual pages

Recommended Posts

Hello all,

I have a site with two languages on same template. I'm in the process of adding hreflang tags but my translated pages still have HTML language in original language. 

My site is in ENG, but is there a way I can override this global setting and give page it's own HTML lang setting? 

Been looking for a fix but can't find one.

Andrew

Link to comment
  • Replies 2
  • Views 2.4k
  • Created
  • Last Reply

No, unfortunately you can only configure the html lang attribute for the whole site.
But I think, you do not need to worry too much about it.

Here are some hints and ideas:

  1. Google ignores the html lang attribute
    Have a look at this video from 2016 with Googles John Muller
    As the attribute is widely misused or unused, Google ignores it.
  2. Google is able to detect the natural language of a document from its url, content...
  3. We created a lot of multilingual sites with Squarespace and they are all correctly and fully indexed.
    As some of the customers insisted on a correct html lang attribute, the only way was to change it via Javascript.
    Check e.g. https://www.inselhostel.com or https://www.vecnum.com
  4. If you really worry about SEO and lanugages you should better use hreflang to provide different language versions.
    Read about hreflang in the Google Webmaster Guidelines https://support.google.com/webmasters/answer/189077?hl=en
    If you want to use this in Squarespace, you will have to inject this per page manually in each page > settings > advanced > page header code injection.
    But you have to take care with domain and URL changes. If one language url changes you will have to change all translated pages.
Link to comment
  • 8 months later...

I have been looking for an answer for this as well!

I have sites with individual translated texts that I'd like to have tagged in that langeuage so that if somebody using a screen reader will catch the correct way to read it out loud. I have sites in Finnish and they have some sections in Swedish and English, would be very essential go get those parts listed correctly.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.