Star
1.1K

Nuxt I18n

How to use the Nuxt Schema.org module with Nuxt I18n.
Nuxt SEO Pro
  • Nuxt Redirects
  • Nuxt Google Search Console
  • Nuxt Internal Links
  • Nuxt SEO Analyze
Save $170 on the presale now.

I18n Defaults

When using the defaults configuration, the module will automatically integrate with Nuxt I18n.

It will read your configuration, adding unique WebSite entities for each locale and connecting them with translationOfWork and workTranslation properties.

As an example, the following would be generated when vising the default en route when your site supports both ja and zh.

{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@id": "https://nuxtseo.com/en#website",
      "@type": "WebSite",
      "description": "The quickest and easiest way to build Schema.org graphs for Nuxt.",
      "inLanguage": "en-US",
      "name": "nuxt-schema-org",
      "publisher": {
        "@id": "https://nuxtseo.com/#identity"
      },
      "url": "https://nuxtseo.com/en",
      "workTranslation": [
        {
          "@id": "https://nuxtseo.com/ja#website"
        },
        {
          "@id": "https://nuxtseo.com/zh#website"
        }
      ]
    },
    {
      "@id": "https://nuxtseo.com/en/#webpage",
      "@type": "WebPage",
      "about": {
        "@id": "https://nuxtseo.com/#identity"
      },
      "description": "The quickest and easiest way to build Schema.org graphs for Nuxt.",
      "isPartOf": {
        "@id": "https://nuxtseo.com/en#website"
      },
      "name": "Welcome",
      "potentialAction": [
        {
          "@type": "ReadAction",
          "target": [
            "https://nuxtseo.com/en"
          ]
        }
      ],
      "url": "https://nuxtseo.com/en"
    },
    {
      "@id": "https://nuxtseo.com/#identity",
      "@type": "Organization",
      "name": "nuxt-schema-org",
      "url": "https://nuxtseo.com"
    }
  ]
}
Did this page help you?