query-f76b8633154ae362f7bed36d6644e134

rq turtle/ttl

Wikmedia languages and their language codes

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?code ?langLabel WHERE {
?lang wdt:P424 ?code.
{?lang wdt:P31 wd:Q34770} UNION {?lang wdt:P31/wdt:P31 wd:Q20829075} UNION {?lang wdt:P31/wdt:P279? wd:Q33215}
# language or type of language or constructed language (e.g Volapuk) or type of constructed language (e.g. Simple English = controlled language)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?code

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?code"):::projected v2("?lang") a1((" ")) a2((" ")) c3(["wd:Q34770"]):::iri c8(["bd:serviceParam"]):::iri c4(["wd:Q20829075"]):::iri c5(["wd:Q33215"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"wdt:P424"--> v1 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P31"--> a2 subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; a2 --"wdt:P279"--> c5 end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P31"--> a1 a1 --"wdt:P31"--> c4 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P31"--> c3 end union0r <== or ==> union0l end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end