Internationalisation
Language, locale, direction, and translated content.
5 topics in this category.
-
hreflang for language and regional URLs
Recommendedhreflang tells search engines which language or regional version of a page to show to which user. It uses BCP 47 codes and must be reciprocal across all alternates.
-
lang attribute on inline content
RequiredMark passages, phrases, and inline elements that differ from the document language with a lang attribute. WCAG 3.1.2 requires it so assistive tech can switch pronunciation.
-
RTL and bidirectional text
RecommendedSites that serve Arabic, Hebrew, Persian, or Urdu must set dir="rtl" and use CSS logical properties so layouts mirror correctly without hard-coded left and right.
-
Locale-aware content
RecommendedDates, numbers, currency, and units should be formatted in the user's locale. Use Intl APIs in the browser and the same locale data server-side so output matches expectations.
-
Internationalised Domain Names (IDN)
OptionalIDNs let domain names contain non-ASCII characters. They are encoded as Punycode on the wire and rendered as Unicode in the browser, subject to anti-spoofing rules.