Languages and regions
Serve each language and script with translated metadata, hreflang, translate hints, right-to-left text, local dates and numbers, and no forced geo redirects.
- Required 1
- Recommended 7
- Optional 4
- Avoid 1
Required
Mark foreign words
RequiredMark every passage in another language with its own
langattribute.
Recommended
Give each language its own path
RecommendedGive each language one clear address pattern, such as
/en/and/sv/, and keep it stable.Link language versions together
RecommendedOn 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
RecommendedSet the language in
lang,og:localeandinLanguagein structured data, and write alt text in that language.Let people pick their language
RecommendedOn sites with several languages, offer a switcher that names each language in that language and keeps people on the same page.
Support right-to-left text
RecommendedSupport right-to-left languages with
dir, logical CSS properties anddir="auto"on user input.Format dates and numbers for the reader
RecommendedFormat dates, numbers and money for the reader's locale with a formatting library. Show times with a named time zone.
Get plurals right in every language
RecommendedChoose plural forms from the language's plural rules instead of adding an "s".
Optional
List language versions in the sitemap
OptionalOn sites with several languages, list each page's language versions in the sitemap with
hreflang.Keep names out of machine translation
OptionalProtect names, code and addresses from machine translation with
translate="no".Support vertical and CJK text
OptionalWhere Chinese, Japanese or Korean (CJK) text appears, support vertical writing and their line breaking with
writing-modeand the right line-break rules.Make non-ASCII domains work
OptionalIf you use a domain name with non-Latin or accented letters, make its punycode form work everywhere the name appears.
Avoid
Never redirect by location
AvoidNever send people to another language or country by IP address or
Accept-Language. Suggest it and let them choose.
For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers website playbook: https://agentwranglers.se/playbook/website/languages-and-regions.