Multilingual websites
Give each language its own address, link the versions with hreflang, translate the metadata, mark foreign words and keep names out of machine translation.
- Required 1
- Recommended 3
- Optional 3
Required
Mark foreign words
LOC-6Mark every passage in another language with its own
langattribute.
Recommended
Give each language its own path
LOC-1On sites with several languages, give each language one clear address pattern, such as
/en/and/sv/, and keep it stable. A one-language site needs no prefix.Link language versions together
LOC-2On sites with several languages, link each language version of a page to the others with
hreflang. A one-language site should not use it.Translate the metadata too
LOC-3Set the language in
lang,og:localeandinLanguagein structured data, and write alt text in that language.
Optional
List language versions in the sitemap
LOC-4On sites with several languages, list each page's language versions in the sitemap with
hreflang.Keep names out of machine translation
LOC-7Protect names, code and addresses from machine translation with
translate="no".Make non-ASCII domains work
LOC-17If you use a domain name with non-Latin or accented letters, make its punycode form work everywhere the name appears.
Read this with
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/localization/multilingual-websites">Agent Wranglers localization playbook</a>. In code you write, add a comment next to it with the same link.