og:locale
<meta property="og:locale" content="de_DE" />
<meta property="og:locale:alternate" content="en_US" />What social networks read when somebody shares a link. Switched off with seo.ogLocale: false.
Note the underscore: Open Graph writes de_DE, hreflang writes de-DE. The plugin sets both
correctly from the same locale field.
<html lang>
That is produced by Quartz, not by the plugin — from the page’s frontmatter field lang. And
that field is exactly what the plugin sets during detection, if it is missing.
A small chain follows:
folder name de/ → detection → frontmatter.lang = de-DE → <html lang="de-DE">
Writing the field yourself does not get overridden by the detection — it is only set when absent.
code and locale are two things
| Field | What for | Example |
|---|---|---|
code | folder names, file suffixes, frontmatter, data-lang | de |
locale | <html lang>, hreflang, og:locale | de-DE |
Without a locale the plugin takes the code — then <html lang="de"> appears. That is valid but
less precise: de-AT and de-DE differ in date and number formats.
languages:
- { code: de, native: Deutsch, locale: de-DE }
- { code: en, native: English, locale: en-US }Why screen reader users notice
<html lang>decides which pronunciation a screen reader uses. With the wrong language there, German text is read out in English — incomprehensible, and this is the cheapest accessibility improvement there is.