Language Attributes on Multilingual Websites
Website intelligenceLanguage Attributes on Multilingual Websites
A multilingual website needs to identify the main language of each document. If every page inherits one fixed language value, visitors using assistive technology may hear words pronounced incorrectly on pages written in another language.
Set the document language for each version
The lang attribute belongs on the root HTML element and should reflect the main language of the page. If the site publishes separate language versions, each version should use a matching value.
Do not infer the page language from the server location or the visitor's browser. The language should describe the actual document content.
Check the value reported by SiteBoost
SiteBoost reports whether the scanned page includes a language attribute. Inspect the live source when it is missing or unexpected and identify which root layout creates the element.
For multilingual sites, test a page from each language version rather than assuming a global layout value applies to every page.
- Check the root html lang value.
- Match it to the page's primary language.
- Review each localized URL.
- Consider language changes within substantial page sections.
Include language in accessibility testing
A correct root language declaration supports assistive technology but does not translate the page or ensure that every paragraph is accurate.
Rescan representative language versions after updating the layout and review the content with an appropriate language reviewer.
