I have facts expressed in Turtle/Notation3 syntax that use language tags for localization of strings, e.g.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix ex: <http://www.example.org/#>.
ex:A rdfs:label "example"@en;
rdfs:label "beispiel"@de.
Is it possible and if so, how could one define rules specific to a given language tag?
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix ex: <http://www.example.org/#>.
{
?s rdfs:label ?v@en. # a mechanism is needed here to select for 'en' lang tag
}
=>
{
?s a ex:EnglishLabeledThing.
}.
Thanks for your help ;)
I tried various variations of the above syntax, accessing properties of langString or LocalizableString but did not came up with a solution. Also I could not find any explanation in the N3 specs. I'm using EYE v2.3.0.
For future reference, I came up with a solution by using func (http://www.w3.org/2007/rif-builtin-function#):
results in
ex:A a ex:EnglishLabeledThing.
as expected, however I also came across thepred:matches-language-range
which might be a better fit here.