问题原文
原帖链接 · London Smith · CC BY-SA 4.0
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?
已采纳解答
原帖链接 · unor · CC BY-SA 4.0
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.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
