Agent Wranglers

Languages and regions Recommended

Translate the metadata too

Set the language in lang, og:locale and inLanguage in structured data, and write alt text in that language.

How to do it

Set lang, og:locale and inLanguage from the page's language. Translate titles, descriptions and alt text.

Example

<html lang="sv">
<head>
  <title>Priser | Example</title>
  <meta property="og:locale" content="sv_SE">
  <script type="application/ld+json">
    { "@context": "https://schema.org", "@type": "WebPage", "name": "Priser", "inLanguage": "sv" }
  </script>
</head>

How to check

A test reads each language version. lang, og:locale and inLanguage agree, and the title differs from the default language.

For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers website playbook: https://agentwranglers.se/playbook/website/languages-and-regions/localised-metadata.