Skip to main content

One document, several languages

StorM Web Engine2 min readBYTHECLOUD ENT

How StorM Web Engine publishes one site in four language versions, so that the addresses, the links between versions and the sitemap always describe the same set.

One document, one address per language

The company site is written once and published in four languages: English, Korean, Simplified Chinese and Traditional Chinese. Each language has its own address. English is at the root, Korean is under /ko, Simplified Chinese under /zh-hans and Traditional Chinese under /zh-hant. The engine builds every version from the same document.

Each version names all the others

Every version declares the same set of alternates in its head. The home page in each language lists English, Korean, Simplified Chinese, Traditional Chinese and an x-default entry. The x-default entry points to the English address, the version for a visitor whose language matches none of the others. Each checked page names its own address as the canonical address, and the html lang value matches the language of the text.

The language switch in the menu works the same way. On the StorM Web Engine page, the Korean link goes to the Korean version of that page. The Simplified and Traditional Chinese links go to the home page of each Chinese version.

A page without a translation is left out

A page is published only in the languages where it has a version. The StorM Web Engine page exists in English and Korean. Its alternates name only those two languages and the x-default entry. The address /zh-hans/storm-web-engine returns a not-found error, and the page does not appear in the Simplified Chinese part of the sitemap. The research page in Simplified Chinese, /zh-hans/research, also returns a not-found error and is not in the sitemap.

A visitor is not sent to a missing address. A language switch on a page without that translation goes to the home page of the other language.

The sitemap lists the same set

The Simplified and Traditional Chinese parts of the sitemap each list fewer pages than the English and Korean parts, because some pages have no Chinese version. Each entry carries the alternates of its page, so the sitemap and the page heads describe the same set of versions.

Each sitemap entry lists every version of its page, so a crawler that reads any one entry sees all of them. A page that exists only in English and Korean is listed in those two languages and in the x-default entry, and in no Chinese part.

The sitemap writes the Chinese codes as zh-Hans and zh-Hant. The page heads write zh-hans and zh-hant. A language tag is not case-sensitive, so both spellings name the same languages.

Chinese is two languages

Simplified and Traditional Chinese are separate language versions. Each has its own address, its own html lang value and its own entry in the language switch.

What this note does not cover

This note reports what the site publishes today. It checks the language tags on the four home pages and on three inner pages (/storm, /zh-hant/storm and /storm-web-engine), the language parts of the sitemap, and three addresses that should return a not-found error. It does not check the translated text on every page. It does not describe how any search engine uses these tags. Ranking is decided by the search engine, not by the tags.

Published with BWS

More from Research

  1. StorM Web EngineWhat the security headers on our site actually do
  2. StorM Web EngineCard terminals: the rules for pairing and revoking
  3. StorM Web EngineEvery date follows the shop's clock