How do og:locale and og:locale:alternate describe language variants?

The Citead team, updated

In short. Use Open Graph's underscore locale notation for og:locale and repeat og:locale:alternate once for each additional locale.

Definition: og:locale identifies the locale used for the Open Graph tags on a page. og:locale:alternate lists other locales in which the page is available, with one repeated meta tag for each additional value.

Key facts

  • The Open Graph protocol specification defines og:locale with the format language_TERRITORY and gives en_US as its default.
  • The same specification defines og:locale:alternate as an array of other locales in which the page is available.
  • Open Graph arrays use repeated versions of the same meta tag, and the first tag from top to bottom is preferred during conflicts.
  • RFC 5646 separates language-tag subtags with a hyphen and defines optional script and region positions.
  • The HTML Standard requires an HTML lang value to be a valid BCP 47 language tag, which follows the RFC syntax.

What does og:locale identify?

The Open Graph specification treats og:locale as optional metadata for the locale in which the tags are marked up. Its documented notation is a language component, an underscore, and a territory component: language_TERRITORY. When the property has no explicit value, the specification gives en_US as the default.

The specification's example uses en_GB for the page's current locale. That spelling is specific to the Open Graph property. It gives the locale as metadata about the page object, alongside properties such as og:title and og:url.

<meta property="og:locale" content="en_GB" />

How are alternate locales repeated?

The Open Graph protocol describes og:locale:alternate as an array of other locales in which the page is available. Its example places one og:locale tag before two repeated alternate tags:

<meta property="og:locale" content="en_GB" />
<meta property="og:locale:alternate" content="fr_FR" />
<meta property="og:locale:alternate" content="es_ES" />

The protocol's array rule says to place multiple versions of the same meta tag on the page when a tag has multiple values. The first tag, read from top to bottom, is given preference during conflicts. For this field, each og:locale:alternate tag therefore contributes one locale value, while the og:locale tag remains the page's declared current locale.

How does the notation relate to BCP 47?

RFC 5646 defines a language tag as one or more subtags separated by hyphens. Its syntax places the language first, then allows a script and a region, followed by other registered components. A region subtag can contain two letters or three digits. The RFC also says language tags are case-insensitive, while recommending lowercase language codes and uppercase country codes for consistent presentation.

That syntax produces forms such as en-US, with a hyphen. The Open Graph specification's en_US form uses an underscore because it defines its own language_TERRITORY notation. The two strings belong to different metadata conventions even though they can describe a similar language and territory combination.

The HTML Standard applies the BCP 47 form to the HTML lang attribute. A page can therefore use the hyphenated form for document language and the Open Graph form for og:locale:

<html lang="en-US">
<meta property="og:locale" content="en_US" />

What should you check in the page source?

Inspect the document's <head> for one og:locale property and one repeated og:locale:alternate property for each additional locale. Compare the values against the Open Graph examples, including the underscore between the language and territory portions. Separately inspect lang on the HTML element and use the BCP 47 hyphenated form required by the HTML Standard. The Open Graph example places these declarations among the page's other meta elements in the head.

FAQ

Should you write en_US or en-US in og:locale?

Use the Open Graph form en_US. The protocol specifies language_TERRITORY and gives en_GB as an example. Use the BCP 47 form, such as en-US, for the HTML lang attribute.

How do you list two alternate locales?

Add two og:locale:alternate meta tags, each with one locale in its content value. The protocol's example uses fr_FR and es_ES as two repeated values.

Sources

  1. Open Graph protocol, "The Open Graph protocol", undated
  2. IETF, "RFC 5646: Tags for Identifying Languages", September 2009
  3. WHATWG, "HTML Standard", 2026-10-19

Check how a page reads to answer engines. Open the GEO score analyzer

Test a page and see what to fix first

The analysis usually takes less than 10 seconds and needs no account.

400,000+ pages scored in the public benchmark