Template:Query labels

From Wikidata
Jump to navigation Jump to search

SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }

Documentation icon Template documentation[view · edit · history · purge ]

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]

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" }
 }
Try it!

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.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
first language1

no description

Unknownoptional
second language2

no description

Unknownoptional
third language3

no description

Unknownoptional
fourth language4

no description

Unknownoptional
fifth language5

no description

Unknownoptional
seventh language6

no description

Unknownoptional