JSON-LD fully support the identification of the language types.

Properties such as label, description, keyword etc can be extended in the context with a container language attribute notiation.

This will allow the use of standard language codes (fr, es, en, de, etc) to be used when describing these properties.

 2    "@context": {
 3      "vocab": "",
 4      "label": {
 5        "@id": "vocab:label",
 6        "@container": "@language"
 7      }
 8    },
 9    "@id": "",
10    "label": {
11      "en": "The Queen",
12      "de": [ "Die Königin", "Ihre Majestät" ]
13    }
14  }
import json
from pyld import jsonld
import os, sys

currentdir = os.path.dirname(os.path.abspath(''))
parentdir = os.path.dirname(currentdir)
sys.path.insert(0, parentdir)
from lib import jbutils

with open("./graphs/language.json") as dgraph:
    doc = json.load(dgraph)

context = {
    "@vocab": "",

compacted = jsonld.compact(doc, context)

In graph space the resulting triples from the above are:

<> <> "Die Königin"@de .
<> <> "Ihre Majestät"@de .
<> <> "The Queen"@en .

with language encoding attributes in place. These can be used in searching and result filters.

Note, this can cause issues in query space since the concept of

"The Queen"


"The Queen"@en

are different and so care must be taken the creation of the SPARQL queries not to accidentally imposed implicate filters through the use of language types.