query-5ed7c0d5f3fe40650080f55f8ec7c78b
Picks the first available from "pt-br", then "pt", your user interface language on query server, then "en". Complicated way:
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?itemDescription ?d1 ?d2
WHERE
{
?item wdt:P31 wd:Q55488; wdt:P131 wd:Q174
OPTIONAL { ?item schema:description ?d1 . FILTER(lang(?d1)="pt") }
OPTIONAL { ?item schema:description ?d2 . FILTER(lang(?d2)="pt-br") }
SERVICE wikibase:label { bd:serviceParam wikibase:language "pt-br,pt,[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?d1"):::projected
v1("?d2"):::projected
v3("?item"):::projected
c9(["bd:serviceParam"]):::iri
c11(["pt-br,pt,#91;AUTO_LANGUAGE#93;,en"]):::literal
c6(["wd:Q174"]):::iri
c4(["wd:Q55488"]):::iri
v3 --"wdt:P31"--> c4
v3 --"wdt:P131"--> c6
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."schema:description".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."schema:description".-> v1
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end