Reputation: 35
I want to get for a given wikidata resource its corresponding resource in other language, for example for http://wikidata.dbpedia.org/page/Q178794 resource , i want to get
ar ساعة يد
az Qol saatıbg Ръчен часовникbn হাতঘড়ি
ca Rellotge de polseracdo
fr Montre(horlogerie) ....
I searched and i founded that it's possible to request wkidata by its api or with sparql
How can i do that
Upvotes: 0
Views: 245
Reputation: 1841
you can use the wbgetentities API module to build your request:
https://www.wikidata.org/w/api.php?action=wbgetentities&format=json&props=labels&ids=Q178794
Upvotes: 1
Reputation: 35
it works with :
SELECT ?English ?language ?label
WHERE
{
wd:Q178794 rdfs:label ?English
; rdfs:label ?label .
FILTER (LANG(?English) = "en")
BIND(LANG(?label) as ?languageCode)
?languageCode ^ps:P424 ?lstatement . ?lstatement pq:P794 wd:Q22283033 ; ^p:P424 ?wdLanguage .
?wdLanguage rdfs:label ?language .
FILTER (LANG(?language)="en")
}
Upvotes: 0