Open Graph Locale Explained
Understand the og:locale property, how to set language and region codes, and when to use og:locale:alternate for multilingual sites.
The og:locale property tells social platforms what language and region your content is written in. While often overlooked, proper locale configuration is essential for multilingual websites and international SEO.
What Is og:locale?
The og:locale tag specifies the language and territory of your page content using a combination of ISO 639-1 language codes and ISO 3166-1 country codes, joined with an underscore:
<meta property="og:locale" content="en_US" />
If omitted, social platforms default to en_US. For English-language pages targeting US audiences, you can technically skip it — but explicitly declaring it is best practice.
Common Locale Codes
| Code | Language & Region |
|---|---|
en_US |
English (United States) |
en_GB |
English (United Kingdom) |
es_ES |
Spanish (Spain) |
es_MX |
Spanish (Mexico) |
fr_FR |
French (France) |
de_DE |
German (Germany) |
pt_BR |
Portuguese (Brazil) |
pt_PT |
Portuguese (Portugal) |
ja_JP |
Japanese (Japan) |
zh_CN |
Chinese (Simplified, China) |
zh_TW |
Chinese (Traditional, Taiwan) |
ko_KR |
Korean (South Korea) |
ar_SA |
Arabic (Saudi Arabia) |
hi_IN |
Hindi (India) |
og:locale:alternate for Multilingual Sites
If your website serves content in multiple languages, use og:locale:alternate to declare the additional language versions:
<!-- Primary language -->
<meta property="og:locale" content="en_US" />
<!-- Alternative languages -->
<meta property="og:locale:alternate" content="es_ES" />
<meta property="og:locale:alternate" content="fr_FR" />
<meta property="og:locale:alternate" content="de_DE" />
<meta property="og:locale:alternate" content="ja_JP" />
How Platforms Use Alternate Locales
When Facebook renders a preview card, it checks the viewer’s language preference. If the shared page declares an alternate locale matching the viewer’s language, Facebook may display a translated card title or description (when available via the localized page URL).
Combining og:locale With hreflang
For full multilingual SEO, combine Open Graph locales with HTML hreflang tags:
<!-- Open Graph Locale -->
<meta property="og:locale" content="en_US" />
<meta property="og:locale:alternate" content="es_ES" />
<!-- SEO hreflang -->
<link rel="alternate" hreflang="en" href="https://example.com/page" />
<link rel="alternate" hreflang="es" href="https://example.com/es/page" />
<link rel="alternate" hreflang="x-default" href="https://example.com/page" />
The og:locale tags serve social platforms while hreflang serves search engines. Both are needed for a comprehensive internationalization strategy.
Common Mistakes
1. Using Language-Only Codes
og:locale requires the full language_TERRITORY format. Using en instead of en_US may cause parsing failures on some platforms.
2. Mismatched Content Language
If your page content is in Spanish but og:locale says en_US, platforms may misrepresent your content to users. Always match the locale to the actual page language.
3. Forgetting Alternate Locales
If you have translated pages but only declare og:locale without any og:locale:alternate tags, social platforms won’t know that other language versions exist.
Related Resources
- Open Graph Tags: Complete List With Examples
- Open Graph Protocol: Complete Developer Guide
- Open Graph Template: Complete HTML Template
- Generate locale-aware OG tags with the Open Graph Generator