I know how to set the language of a literal: "foo"@en
But what about ?foo@en
(which doesn't work)?
Context: I want to copy a bunch of labels set to en-gb
into just en
so they play better with the knowledge management tool I'm using. So something like this:
INSERT {
?subject skos:prefLabel ?object@en
}
WHERE {
?subject skos:prefLabel ?object .
FILTER (lang(?object) = "en-gb")
}
str
allows you to get the lexical form of a language-tagged literal, andSTRLANG
allows you to specify the language tag of a literal.Example:
?label_enGB
:"foo"@en-gb
str(?label_enGB)
:"foo"
STRLANG(str(?label_enGB), "en")
:"foo"@en