Commit 50705e50 authored by Laurent Wouters's avatar Laurent Wouters
Browse files

[fix] Display language tag for RDF literal node in Triples view

parent e1bdf77f4011
......@@ -168,7 +168,17 @@ function renderRdfNode(
} else if (node.termType == "Literal") {
let nodeLiteral = node as $rdf.Literal;
let sub = document.createElement("span");
sub.appendChild(document.createTextNode("_:" + nodeLiteral.value));
let language =
nodeLiteral.lang != null &&
nodeLiteral.lang != undefined &&
nodeLiteral.lang.length > 0
? nodeLiteral.lang
: nodeLiteral.language != null && nodeLiteral.language != undefined
? nodeLiteral.language
: "";
let text = '"' + nodeLiteral.value + '"';
if (language.length > 0) text += "@" + language;
sub.appendChild(document.createTextNode(text));
result.appendChild(sub);
}
return result;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment