schema.org:用于标记的语言

schema.org: which language to use for markup

这听起来像是一个愚蠢的问题,但是:我的代码标记应该使用哪种语言?我正在用德语写文章。

当然标签本身是固定的,但是如何帮助机器人理解我正在写的主题?

<div itemscope itemtype="http://schema.org/MedicalWebPage"> <link itemprop="about" href="http://schema.org/MedicalCondition" /> <meta itemprop="name" content="Posttraumatische Belastungsstörung"/> <meta itemprop="aspect" content="Psychotherapie"/> <meta itemprop="keywords" content="Trauma, PITT, PTBS, PTSD, Traumatherapie"/> <meta itemprop="alternateName" content="PTBS"/>

出现以下问题:

  1. 我可以在单个 属性 中添加几个 'aspects' 还是必须 为每个添加 1 'aspect' 标签?

  2. 使用英文术语对属性进行分类是否更好,例如 'aspect' 或 'keywords',例如使用 'psychotherapy' 或 'diagnosis' 而不是 'Psychotherapie' 和 'Diagnose'?

  3. 当然,我想避免让我的 html 代码膨胀。如果我有相应的 'keywords' 标签,那么定义另一个标签是否有意义 无论如何我的文档中的常规元标记?

最明显的方法是使用 content/document 所在的语言。如果您想到 BlogPosting: its name should of course be the actual blog posting title, not a translation of it; even more so the articleBody 等,这一点就很清楚了。通常,aspectkeywords 等属性也是如此。但是,在某些情况下,Schema.org 可能会决定推荐使用某些值(因此不仅仅是举例,就像他们对 aspect 所做的那样)¹,在这种情况下,您应该遵循此建议而不是翻译值.

话虽如此,当然可能会有消费者对德语内容做某事,但出于该目的期望某些属性具有某些值(在某种其他语言中)。除非你知道这样的消费者,否则我不会担心。

如果您认为有用,可以提供多种语言的值。在 Microdata 中,解析器不会区分语言(因为 Microdata 不关心 HTML 的 lang 属性,所以它不是很实用),但它是 possible with RDFa.

¹ 在这种情况下,理想情况下,他们应该使用枚举 URI,因为它们与语言无关;例如,对于 MedicalSpecialty: http://schema.org/Psychiatric, http://schema.org/PlasticSurgery