大网数据广告活动
网站运营与故障问答

Semantic markup itemprop name / description on multilingual website

· 52CE 我爱测

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: Th…

问题原文

原帖链接 · 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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2019-07-26)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。