Many SEO specialists believe that hreflang is only used to set the language and geographical target associated with the page. But there is a third categorization, the script.
The script, language script, or writing system defines the script of the language, in other words, the set of characters used in the language’s written form.
When you should use script variations
By default (if not defined), the script is derived from the language. In most cases, a language has only one possible associated script (E.g., English, Spanish, and many more.), but languages like Chinese and others support different scripts.
The Chinese language has two script variations, the traditional variant created before 1946 and associated with the code “Hant” and the Simplified variant associated with the code “Hans”.
With the term code, I’m referring to the four-letter script defined in the ISO 15924, a specification that defines the scripts’ names and codes. Additional information and links to pdf documents with many details on each script’s history are available on this Wikipedia page.
Implement script variations with hreflang
The four-letter script variation codes should be added after the language code and separated with a dash.
Let’s consider the same example of the previous section. You can define the Chinese language with the traditional variant with
zh-Hant and the Chinese language with the simplified variant with the
An example of an hreflang implementation with HTML tags (placed in the head section) used to define the language variations of a page:
<link rel="alternate" hreflang="zh-Hant" href="https://example.com/chinese-with-traditional-script/" /> <link rel="alternate" hreflang="zh-Hans" href="https://example.com/chinese-with-simplified-script/" />
If the geographic target is also defined the HTML tags may look like this:
<link rel="alternate" hreflang="zh-Hant-tw" href="https://example.com/chinese-with-traditional-script-for-taiwan/" />
Hreflang script variation with WordPress
We have a WordPress plugin specifically created to implement hreflang tags, the Hreflang Manager plugin. This plugin is available for free on WordPress.org. You can also purchase its premium version on our website if you are interested in additional features like the ability to bulk import and export data, an increased number of supported alternative versions per page, an editor of hreflang embedded in Gutenberg, and more.
With Hreflang Manager, you can use a CRUD editor to define the language, script, and geographic target of each page. To define the language script of an alternative version of the page, use the “Script” selector.
Additional information about hreflang
If you are new to the hreflang subject, consider as a primary source of information this advanced SEO document provided by Google. We recently also published on our blog an article with the frequently asked on hreflang.