lang text mismatch

warning lang-text-mismatch hreflang and language versions

The script is right and the language is not: English text under lang="de", Indonesian under lang="ms", Arabic under lang="fa". It is how an untranslated page looks on a multilingual pipeline — the template was translated, the body was not. Detected by common function words, and only when one language clearly leads; otherwise the check stays silent. Since 1.33 the package knows 145 languages (indexgap/data/languages.json): about 120 by function words in the Latin, Cyrillic, Arabic, Devanagari, Bengali, Hebrew and Ethiopic scripts, the rest by a script only one of them uses (Korean, Japanese, Thai, Georgian, Armenian, Greek, Khmer, Lao, Burmese, Sinhala and the South Indian scripts). Written standards that read as one (Croatian, Bosnian and Serbian; Chinese and Cantonese; Bokmål and Nynorsk) are never reported against each other. For Chinese it also compares the characters with the region: zh-TW, zh-HK or zh-Hant over Simplified characters, or zh-CN over Traditional ones, is a version nobody adapted.

What indexgap reports

The finding reads:

warning  lang-text-mismatch  the page declares lang="…", but the text is written in … Chinese characters: the version for this region looks unadapted

How to fix it

Translate the page body, or close it from the index until there is a translation: an untranslated page in an hreflang cluster is served where the reader expects their own language.

How it behaves at scale

Collapsed when it fires template-wide. If it appears on 90% or more of the pages — or of one language version — of a site with at least 20 pages, it is a property of the template and is reported once, with the count, instead of once per page.

Finding it

pipx install indexgap
cd your-project
indexgap init
indexgap check

Then indexgap brief turns every finding on this page into a work order in indexgap-briefs/, with the thresholds the result has to satisfy and the command to check it.

Related checks in hreflang and language versions

All checks · hreflang and language versions