How to fix valid lang on PrestaShop

Add or correct the `lang` attribute on every HTML element that contains content in a different language, using a valid BCP 47 language code.

Steps for PrestaShop

  1. PrestaShop generates the `<html lang>` attribute from the active language. Go to Admin → International → Translations → Languages and verify the language code (ISO code field) for each installed language is a valid two-letter ISO 639-1 code (e.g. `en`, `fr`, `de`).
  2. In your active theme, open `templates/_partials/head.tpl` (or the root layout file). Find the `<html` tag and ensure it uses the Smarty variable `{$language.iso_code}` rather than a hard-coded value.
  3. If using a custom or third-party theme that hard-codes an invalid `lang` value, override the template in your child theme and correct it.
  4. Save, clear cache (Admin → Advanced Parameters → Performance → Clear cache), and verify.
Official PrestaShop documentation ↗

What is valid lang?

Every HTML page has a primary language declared on its `<html>` tag (e.g. `lang="en"` for English). When a block of text on that page is written in a different language — a French product description on an English store, for example — that element needs its own `lang` attribute with a valid language code so assistive technology knows to switch pronunciation rules. The "valid-lang" rule fires when a `lang` attribute exists on an element but contains an unrecognised or misspelled value (e.g. `lang="english"` instead of `lang="en"`, or `lang="en_US"` instead of `lang="en-US"`). Valid codes follow the BCP 47 standard: a two- or three-letter primary subtag (`en`, `fr`, `de`, `zh`) optionally followed by a region subtag after a hyphen (`en-US`, `fr-CA`, `zh-Hant`).

Screen readers such as JAWS, NVDA, and VoiceOver use the `lang` attribute to select the correct text-to-speech voice and pronunciation engine. An invalid value means the reader either ignores the instruction or speaks the text with completely wrong phonetics, making your content incomprehensible to blind and low-vision shoppers. WCAG 2.1 Success Criterion 3.1.2 is a Level AA requirement, meaning failure can expose your store to accessibility lawsuits (ADA, Section 508, EU Accessibility Act). Beyond legal risk, Google uses language signals to serve your pages to the right regional audiences — incorrect or absent language markup can suppress your rankings in multilingual search results and reduce qualified organic traffic.

See the complete Valid lang guide for every platform and the full background.

Not sure if your PrestaShop store has this?

Run a free SEOLZ scan — we’ll find valid lang and every other issue across your whole site.

Scan my site free

Fix valid lang on another platform