{"id":245,"date":"2020-01-09T12:42:19","date_gmt":"2020-01-09T12:42:19","guid":{"rendered":"http:\/\/wikidata.wwwnlsrc4.supercp.com\/?page_id=245"},"modified":"2020-01-17T15:02:07","modified_gmt":"2020-01-17T15:02:07","slug":"specifying-label-language","status":"publish","type":"post","link":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/simple-queries\/the-simplest-query\/specifying-label-language\/","title":{"rendered":"Specifying label language"},"content":{"rendered":"\n<h2>Choosing one or more Label language<\/h2>\n\n\n\n<p>Another way to specify the retrieved label language is to state it in the SERVICE code snippet instead of the &#8220;AUTO LANGUAGE&#8221;.<\/p>\n\n\n\n<p>For example, in the following query, Dutch (nl) labels will be retrieved and presented:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror cm-s-eclipse\" data-setting=\"{&quot;mode&quot;:&quot;sparql&quot;,&quot;mime&quot;:&quot;application\/sparql-query&quot;,&quot;theme&quot;:&quot;eclipse&quot;,&quot;lineNumbers&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true}\">#Star Wars films\n\nSELECT ?item  ?itemLabel \nWHERE \n{ \n  ?item wdt:P179 wd:Q22092344.\n  SERVICE wikibase:label { bd:serviceParam wikibase:language &quot;nl&quot;. }\n}<\/pre><\/div>\n\n\n\n<p>One can specify several languages and the order in which labels are retrieved.  For example, the following query first retrieves the French (fr) label, but if there is no label in French then the German (de) label will be retrieved, and if that one is missing the Italian (it) label will be shown, and so on.<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror cm-s-eclipse\" data-setting=\"{&quot;mode&quot;:&quot;sparql&quot;,&quot;mime&quot;:&quot;application\/sparql-query&quot;,&quot;theme&quot;:&quot;eclipse&quot;,&quot;lineNumbers&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true}\">#Star Wars films\n\nSELECT ?item  ?itemLabel \nWHERE \n{ \n  ?item wdt:P179 wd:Q22092344.\nSERVICE wikibase:label { bd:serviceParam wikibase:language &quot;fr,de,it,es,no,pt&quot;. }\n}<\/pre><\/div>\n\n\n<p><!--EndFragment--><\/p>\n\n\n<p><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Choosing one or more Label language Another way to specify the retrieved label language is to state it in the SERVICE code snippet instead of the &#8220;AUTO LANGUAGE&#8221;. For example, in the following query, Dutch (nl) labels will be retrieved and presented: One can specify several languages and the order in which labels are retrieved. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":""},"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/posts\/245"}],"collection":[{"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/comments?post=245"}],"version-history":[{"count":7,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/posts\/245\/revisions"}],"predecessor-version":[{"id":254,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/posts\/245\/revisions\/254"}],"wp:attachment":[{"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/media?parent=245"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/categories?post=245"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/tags?post=245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}