0

Google's Structured Data Testing Tool doesn't seem to like JSON-LD's @language in value object approach to string internationalization. For example:

{
    "@context": "https://schema.org/",
    "@type": "Person",
    "name": [{"@language": "ar", "@value": "أياس"},
             {"@language": "en", "@value": "Eyas"}]
}

or

{
    "@context": "https://schema.org/",
    "@type": "Person",
    "name": {"@language": "ar", "@value": "أياس"}
}

don't seem to work. I also tried adding "@type": "Text" but that doesn't seem to make it happy either.

Is there an accepted way of specifying multiple language representations of the same thing in Schema.org JSON-LD that is respected by search engines?

I know there's "inLanguage" for certain types, but that is not general enough to, e.g., work with a Person.

EyasSH
  • 3,679
  • 22
  • 36
  • @JayGray I have, but I'm having trouble finding a working solution. schema.org/Text is a Data Type any property on it. If I'm expressing a Person, there's no way for my to put a schema.org/Language on that object, or associate it with a block of text. At least not that I can find. Posting here to see if I missed anything. – EyasSH Apr 05 '19 at 18:41
  • is your objective: `@Person` knowsLanguage `@Language`? or is it: `@CreativeWork` inLanguage `@Language`? – Jay Gray Apr 05 '19 at 19:02
  • My object is finding a way to present `Person.name` in multiple languages/alphabets. I can list two, `"name": ["Eyas", "إياس"]` but wondering if JSON-LD's native ability to specify the language/local has an equivalent available. – EyasSH Apr 05 '19 at 22:08
  • 2
    I just tested your snippets. At first I got an error, but a few tries later, there is no error anymore. – unor Apr 06 '19 at 02:01
  • Ah-- I've just noticed `@language` now works in arrays, but still not in singular values. – EyasSH Apr 22 '19 at 19:12

0 Answers0