What is og:locale?
The og:locale meta tag specifies the language and regional variant of your content using a language_TERRITORY format (e.g., en_US, es_ES, fr_FR). It helps social platforms display your page to the right audience and in the correct language context.
Why does it matter?
Content targeting
- Facebook uses og:locale to categorize and serve content to users in the right language
- LinkedIn uses it for regional content recommendations
- Helps platforms understand which audience segment your content serves
Multi-language sites
If you have content in multiple languages, og:locale is essential:
- Tells platforms which language version is being shared
- Works with
og:locale:alternateto indicate other available languages - Prevents the wrong language version from appearing in previews
SEO alignment
- Complements the
langattribute on your<html>tag - Provides additional language signals to crawlers
- Helps with international SEO and hreflang consistency
How to fix it
<meta property="og:locale" content="en_US" />For multi-language sites
<!-- Primary language -->
<meta property="og:locale" content="en_US" />
<!-- Alternative languages available -->
<meta property="og:locale:alternate" content="es_ES" />
<meta property="og:locale:alternate" content="fr_FR" />
<meta property="og:locale:alternate" content="de_DE" />Common locale values
| Locale | Language |
|---|---|
en_US |
English (US) |
en_GB |
English (UK) |
es_ES |
Spanish (Spain) |
es_MX |
Spanish (Mexico) |
fr_FR |
French |
de_DE |
German |
pt_BR |
Portuguese (Brazil) |
ja_JP |
Japanese |
zh_CN |
Chinese (Simplified) |
Best practices
- Always use language_TERRITORY format —
en_US, notenorenglish - Match your page content — Don't set
en_USon a Spanish page - Be consistent — Align with your
<html lang>attribute and hreflang tags - Default is en_US — If not specified, Facebook assumes
en_US