---
title: "Languages and regions · Agent Wranglers"
url: https://agentwranglers.se/playbook/website/languages-and-regions
updated: 2026-10-20
licence: "All rights reserved"
---

# Languages and regions

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

> Serve each language and script with translated metadata, hreflang, translate hints, right-to-left text, local dates and numbers, and no forced geo redirects.

**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`.

## Required

- [Mark foreign words](https://agentwranglers.se/playbook/website/languages-and-regions/lang-attribute): Mark every passage in another language with its own `lang` attribute.

## Recommended

- [Give each language its own path](https://agentwranglers.se/playbook/website/languages-and-regions/international-url-structure): On 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](https://agentwranglers.se/playbook/website/languages-and-regions/hreflang): On 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](https://agentwranglers.se/playbook/website/languages-and-regions/localised-metadata): Set the language in `lang`, `og:locale` and `inLanguage` in structured data, and write alt text in that language.
- [Let people pick their language](https://agentwranglers.se/playbook/website/languages-and-regions/language-switcher): On 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](https://agentwranglers.se/playbook/website/languages-and-regions/rtl-support): Support right-to-left languages with `dir`, logical CSS properties and `dir="auto"` on user input.
- [Format dates and numbers for the reader](https://agentwranglers.se/playbook/website/languages-and-regions/locale-content): Format 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](https://agentwranglers.se/playbook/website/languages-and-regions/plural-rules): Choose plural forms from the language's plural rules instead of adding an "s".
- [Translate whole sentences](https://agentwranglers.se/playbook/website/languages-and-regions/whole-sentence-messages): On sites with several languages, or one planned, keep every visible text in a message file. Use one entry per whole sentence with named placeholders, and never build a sentence from translated pieces.
- [Test with a pseudo-locale](https://agentwranglers.se/playbook/website/languages-and-regions/pseudo-localisation): When a site will be translated, build a pseudo-locale that makes every text longer and accented. Run the page tests in it before any translation exists.
- [Sort and compare text by locale](https://agentwranglers.se/playbook/website/languages-and-regions/locale-collation): Sort and compare visible text with a collator for the reader's locale, and normalise Unicode before comparing or storing it.
- [Accept names and addresses from every country](https://agentwranglers.se/playbook/website/languages-and-regions/international-names-and-addresses): Let people enter names and addresses as they are written in their country. Never reject letters, word counts or field shapes your own country does not use.

## Optional

- [List language versions in the sitemap](https://agentwranglers.se/playbook/website/languages-and-regions/sitemap-hreflang): On sites with several languages, list each page's language versions in the sitemap with `hreflang`.
- [Keep names out of machine translation](https://agentwranglers.se/playbook/website/languages-and-regions/translate-attribute): Protect names, code and addresses from machine translation with `translate="no"`.
- [Support vertical and CJK text](https://agentwranglers.se/playbook/website/languages-and-regions/writing-modes): Where Chinese, Japanese or Korean (CJK) text appears, support vertical writing and their line breaking with `writing-mode` and the right line-break rules.
- [Make non-ASCII domains work](https://agentwranglers.se/playbook/website/languages-and-regions/idn-support): If 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](https://agentwranglers.se/playbook/website/languages-and-regions/avoid-auto-geo-redirects): Never send people to another language or country by IP address or `Accept-Language`. Suggest it and let them choose.

- Previous: [When things break](https://agentwranglers.se/playbook/website/when-things-break)
- Next: [Measured results](https://agentwranglers.se/playbook/website/measured-results)
- [All chapters](https://agentwranglers.se/playbook/website)
