Skip to content

Internationalisation Module

Module ID: i18n | Type: Conditional (auto-detected) | Profiles: full

The i18n module validates hreflang implementation, language attributes, locale routing patterns, RTL support, and Content-Language headers for multilingual sites.


What It Checks

Check What It Looks For
Hreflang tags <link rel="alternate" hreflang="..."> tags
Self-referencing hreflang Current page has an hreflang pointing to itself
x-default Fallback hreflang for unmatched languages
Valid language codes ISO 639-1 codes and optional ISO 3166-1 regions
Hreflang consistency Reciprocal links between language versions
HTML lang attribute lang on the <html> element matching page language
Content-Language header HTTP header matching the page language
RTL support dir="rtl" for Arabic, Hebrew, Farsi, Urdu pages
Locale routing URL patterns like /en/, /fr/, /de/ or subdomains
Language switcher Visible language selection UI element

Scoring Breakdown

Criterion Deduction Condition
No hreflang tags -20 Multilingual site with no hreflang
Missing x-default -10 No fallback for unmatched languages
No self-referencing hreflang -10 Current page not in its own hreflang set
Invalid language codes -5 per code Codes not matching ISO standards
Missing lang attribute -10 No lang on html element
Lang mismatch -5 HTML lang differs from content language
Missing RTL support -10 RTL language without dir="rtl"
No language switcher -5 No visible way to switch languages

Auto-Detection Signals

  • hreflang= attribute in HTML
  • lang-selector in class or ID attributes
  • language-switcher in class or ID attributes

Example Findings

P1 HIGH: Missing x-default hreflang
  When a user's language doesn't match any hreflang, search engines
  don't know which page to show. x-default acts as the fallback.
  Fix: Add <link rel="alternate" hreflang="x-default" href="https://...">
       pointing to your default language version.
  Effort: Low

P2 MEDIUM: Hreflang uses invalid language code "en_US"
  Hreflang codes must use hyphens, not underscores. "en-US" is correct.
  Fix: Change hreflang="en_US" to hreflang="en-US".
  Effort: Low