1

I would like to set up semantic markup for products such as accommodation on a language stay on a site available in fr, en and es.

I wonder if I can have the name of the Product and its description in its 3 languages! Example:

The page in French:

<div>
  <div itemtype="http://schema.org/Product" itemscope>
  <meta itemprop="mpn" content="925872" />
  <meta itemprop="name" content="Séjour en Immersion chez Marie - Famille d’Accueil Nantes, France" />
  ...
</div>

The same page in English (with a different URL):

<div>
  <div itemtype="http://schema.org/Product" itemscope>
  <meta itemprop="mpn" content="925872" />
  <meta itemprop="name" content="Immersion Stay at Marie - Host Family Nantes, France" />
  ...
</div>

Knowing that they will have the same unique itemprop mpn code, is it possible to have the name and description of a Product in several languages? Is it good for SEO or not recommended?

2 Answers 2

1

HTML

For the HTML, you can use the lang attribute. Linking to translations with rel-alternate/hreflang is another signal consumers could use.

Microdata

Microdata doesn’t take the lang attribute into account, and Microdata doesn’t offer any other way to provide the language of string values.

The other two syntaxes supported by Schema.org, JSON-LD and RDFa, do offer a way. So if that’s important to you, you could switch to RDFa (which is very similar to Microdata).

Schema.org

With the vocabulary Schema.org itself, you can provide the language of content with the inLanguage property. But this property can’t be added to Product items.

You could use it on WebPage, which references the Product with mainEntity:

<body itemscope itemtype="http://schema.org/WebPage">

  <meta itemprop="inLanguage" content="en" />

  <article itemprop="mainEntity" itemscope itemtype="http://schema.org/Product">
  </article>

</body>

But note that this doesn’t formally convey that the string values of the Product (e.g., its name) are also in this language. Maybe consumers suppose that this might probably be the case, though.

2
  • I find it unfortunate that it is not possible to specify the language for the name of the product or its description...For example, the name of the product "Ordinateur Ultrabook - LENOVO" in French is in English "Ultrabook Computer - LENOVO". Jul 26, 2019 at 14:59
  • @LondonSmith: Yes, unfortunately Microdata is not meant to be a good choice for your case: w3.org/TR/microdata - "It is similar to, but generally less expressive than RDFa, and does not support the same level of internationalization. It is simple to learn and process, but authors who need good internationalization support, or want to include structured content in their data should consider using RDFa. (or another format such as JSON-LD) instead."
    – unor
    Jul 26, 2019 at 17:13
1

To make it precise for robots, you could add the lang attribute to the section in question.

Generally speaking, the language of the web content is determined by indexing robots based on the domain/URL (see the Google Docs on this topic) and the lang attribute (mostly found on the <html> tag, hence valid for the whole page).

So if you already use specific domains for the languages and the lang attribute, using it the way you proposed is fine. If you have multiple languages on the same page, then use the lang attribute on the surrounding <div>s in your example code.

2
  • Actually, it's not exactly the same page, for the same announcement, each language has its own URL..so Should I add the attribute lang in the surrounding div ? I already have at the beginning of the document <html lang="fr"> or <html lang="en"> Jul 26, 2019 at 14:03
  • No, if the whole page has just one language, then it is fine at the html tag. But if you use separate URLs for each language, do not forget to add the hreflang tags to each of them correctly.
    – Michael
    Jul 28, 2019 at 18:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.