Guest Posted October 8, 2019 Posted October 8, 2019 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
soft-works Posted October 8, 2019 Posted October 8, 2019 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: 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. Google is able to detect the natural language of a document from its url, content... 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 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.
kerttu Posted June 18, 2020 Posted June 18, 2020 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. Noita Digital
Recommended Posts
Archived
This topic is now archived and is closed to further replies.