I need to get the only the English value from my rdfs:label tag
here is my sample code
<rdfs:label rdf:datatype="&xsd;string">English</rdfs:label>
<rdfs:label xml:lang="fr">French</rdfs:label>
<rdfs:label xml:lang="it">Italy</rdfs:label>
You can filter by the language tag you desire in your result. A couple of ways to do this in SPARQL:
SELECT ?label
WHERE {
?s rdfs:label ?label .
FILTER (lang(?label) = "en")
}
...or use SPARQL's langMatches
:
SELECT ?label
WHERE {
?s rdfs:label ?label .
FILTER langMatches(lang(?sn), "en")
}