Template:Query labels/doc
Jump to navigation
Jump to search
Try it!
This is a documentation subpage for Template:Query labels. It contains usage information, categories, and other content that is not part of the original template page. |
Partial query that generates the boilerplate code for showing language-specific labels in SPARQL queries. Inserts the "en" language by default as a parameter to the service, but several parameters can also be given.
Usage
[edit]{{Query labels}}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
{{sparql|query= select ?item ?itemLabel { ?item wikibase:sitelinks ?sl filter (?sl>0) . #items with at least one sitelink ?item wdt:{{Pid|influenced by}}* wd:Q15777 . #influence by the C programming language {{Query labels}} } }}
select ?item ?itemLabel {
?item wikibase:sitelinks ?sl filter (?sl>0) . #items with at least one sitelink
?item wdt:P737* wd:Q15777 . #influence by the C programming language
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
See also
[edit]Partial query to insert a call to the query service. Language are autofilled but parameters can be done to change the default.
Parameter | Description | Type | Status | |
---|---|---|---|---|
first language | 1 | no description | Unknown | optional |
second language | 2 | no description | Unknown | optional |
third language | 3 | no description | Unknown | optional |
fourth language | 4 | no description | Unknown | optional |
fifth language | 5 | no description | Unknown | optional |
seventh language | 6 | no description | Unknown | optional |