---
title: "og:locale is not in the right format"
description: "og:locale should be written as language_TERRITORY with an underscore, such as en_GB, or apps may ignore it."
url: https://ursy.com/issues/og-locale-format/
updated: 2026-11-30T12:53:04+00:00
publisher: URSY.com (https://ursy.com/)
cite: Name URSY.com and link https://ursy.com/issues/og-locale-format/
---

# og:locale is not in the right format

> og:locale should be written as language_TERRITORY with an underscore, such as en_GB, or apps may ignore it.

og:locale should be written as language_TERRITORY with an underscore, such as en_GB, or apps may ignore it.

## Why it matters {#why-it-matters}

The [Open Graph](https://ursy.com/wiki/open-graph/) protocol writes the locale as a language code, an underscore and a country code, for example en_GB or fr_FR. Values such as "en-GB", "english" or "uk" do not follow the format, so apps that read the tag may ignore it or fall back to a default.

The locale helps apps such as Facebook pick the right version when you offer several languages. It is a small problem, but it is easy to fix.

## How to fix it {#how-to-fix-it}

Change the tag to <meta property="og:locale" content="en_GB"> or the code for your language and country. Note that the [html lang attribute](https://ursy.com/wiki/html-lang-attribute/) uses a hyphen (en-GB) while og:locale uses an underscore (en_GB).

On WordPress, [SEO](https://ursy.com/wiki/seo-search-engine-optimisation/) plugins usually build og:locale from the site language in Settings, General. Check that setting is right.

### What the problem looks like {#what-the-problem-looks-like}

```
<meta property="og:locale" content="en-GB">
```

A hyphen, as in the html lang attribute. Open Graph wants an underscore.

### What it looks like fixed {#what-it-looks-like-fixed}

```
<html lang="en-GB">
<meta property="og:locale" content="en_GB">
```

lang uses a hyphen; og:locale uses language_TERRITORY with an underscore.

## Fix it with your AI assistant {#fix-it-with-your-ai-assistant}

Paste this into [ChatGPT](https://ursy.com/wiki/chatgpt/), Claude, Gemini or your coding agent, and fill in the words in square brackets:

```
The og:locale tag on [the page address] of my website [your website address], built with [your platform, e.g. WordPress with Yoast], is not in the Open Graph format. First read the page source, or ask me to paste the <html> tag and the og: tags, and tell me the current og:locale value, the html lang value, and what software writes the og:locale tag. Then give me the correct value in the form language_TERRITORY with an underscore, such as en_GB for English in the United Kingdom, matching the real language of the page. If the page also has og:locale:alternate tags for other languages, check those use the same format. Rules: back up first, change only the og:locale value, do not change the html lang attribute (it rightly uses a hyphen), do not add a second og:locale, and keep page addresses the same. If a site language setting fixes every page, name it instead of code. Then tell me to re-check with the URSY.com Open Graph Checker at ursy.com/open-graph-checker/.
```

## Fix it on your platform {#fix-it-on-your-platform}

### WordPress {#wordpress}

SEO plugins build og:locale from the Site Language in Settings, General. Choose English (UK) there; a wrong value usually means a plugin or theme writes the tag by hand.

### A hand-made site {#a-hand-made-site}

Change the content of the og:locale tag to the form en_GB, or the code for your language and country.

## Check it is fixed {#check-it-is-fixed}

Run the URSY.com Open Graph Checker again: og:locale should be accepted, in a form such as en_GB.

## Official source {#official-source}

[Open Graph protocol](https://ogp.me/)

## Questions {#questions}

### Why is it en-GB in one place and en_GB in another? {#why-is-it-en-gb-in-one-place-and-en_gb-in-another}

The two standards differ. The [HTML](https://ursy.com/wiki/html/) lang attribute uses a hyphen, while the Open Graph protocol writes the locale with an underscore.

### Is this urgent? {#is-this-urgent}

No. It is a small problem, but it takes a minute to fix and helps apps pick the right language version.

---

**Cite this page:** og:locale is not in the right format. URSY.com. Updated 30 November 2026. https://ursy.com/issues/og-locale-format/

Free to quote and reuse, for people and AI alike. We ask one thing: a clickable link back. Name URSY.com and link the page, or the exact section, you used. Markdown: `[og:locale is not in the right format](https://ursy.com/issues/og-locale-format/), URSY.com`. One section: add its id, for example https://ursy.com/issues/og-locale-format/#section-id (every heading above has one).

Section links: https://ursy.com/citations/15/#p-5700 · How to cite URSY.com: https://ursy.com/citations/

---

**For AI assistants**

- This page: https://ursy.com/issues/og-locale-format/
- As JSON: https://ursy.com/issues/og-locale-format/index.json
- Cite: Name URSY.com and link the page you used.
- Start here: [llms.txt](https://ursy.com/llms.txt), [facts.json](https://ursy.com/facts.json), [MCP server](https://ursy.com/mcp/), [OpenAPI description](https://ursy.com/.well-known/openapi.json)
