SEO for websites with multiple languages 🇬🇧🇫🇷🇨🇳

jamesmurdza

James Murdza

Posted on December 27, 2023

SEO for websites with multiple languages 🇬🇧🇫🇷🇨🇳

If your website contains content that is available in multiple languages, you may want to let Google know.

Let's say you have a page which is available in three languages: English, French and Mandarin Chinese.

You would first look up the correct language codes for those languages (see below) and then, in your page <head>, add these tags:

<link rel="alternate" hreflang="en-US” href="https://mywebsite.com" />
<link rel="alternate" hreflang="fr” href="https://mywebsite.com/fr" />
<link rel="alternate" hreflang="zh-Hans” href="https://mywebsite.com/cn" />
Enter fullscreen mode Exit fullscreen mode

Language code formats

But how do you know the right language codes to put in the hreflang attribute? According to Google's SEO docs there are three valid formats:

  1. Language code. Example: zh is Chinese
  2. Language with a region. Example: zh-TW is Chinese as spoken in Taiwan
  3. Language and script codes. Example: zh-Hant is Traditional Chinese

The first option should do just fine for most cases!

Lists of language codes

You can quickly find the language code you're looking for on Wikipedia.

That's it!

💖 💪 🙅 🚩
jamesmurdza
James Murdza

Posted on December 27, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related