Check Engine / Checks / Reference

Does your page declare the language it uses?

It compares a page's declared language with conservative language clues in the text.

What Check Engine measures

The page needs a language declaration and at least 40 words for language detection. Listing-like text with an anchor share of at least 0.7 is excluded. Name-heavy text is excluded when at least 40 usable words have a capitalised share of at least 0.55. A title favouring the declared language can suppress a mismatch. Bilingual text is accepted when its declared-language share reaches at least 0.4 of the competing language's share. For example, a page with fewer than 40 words cannot enter the language-detection comparison.

The check reads page text, titles, language attributes and link labels on pages intended for search. Pages with too little usable text are left out. It leaves their language unknown.

How to read the result

Remaining mismatches produce a medium-severity finding. The detector and its language coverage impose limits, so the result needs a human reading of the affected page before a declaration is changed.

Why it matters

Your language attribute states how the page should be read. Names, link lists and bilingual passages can confuse a simple text comparison, which is why the code includes guards for each of those patterns.

How to fix it

Read the affected page and confirm the main language. Correct the document language when it is wrong, keeping regional details when they are valid. Review mixed-language sections separately from the page declaration. Use the guide to distinguish a language attribute from alternate-language links, since changing one does not repair the other.

hreflang and html lang mismatch

What we found in field audits

Problems in Content quality were found on 14 of the 14 sites we audited. These are area totals. Read the field-audit method.

Method note

backend/seo_engine/checks/content.py, lang_mismatch, revision 0bb8e8d3.

Common questions

How many words are needed to compare declared and detected language?

The text needs 40 words or more plus a language declaration. Shorter passages leave this comparison unmade.

Can link-heavy pages be excluded from a language mismatch?

Yes. An anchor share reaching 0.7 can exclude listing-like text. Names and bilingual passages also have guards.

How serious is a remaining language mismatch?

It gets a medium-severity finding. A fluent reader should check the text before the document declaration is changed.