List of properties
edit
Current state
edit
links to Wikipedia in the user language
edit
WikidataID and wgUserLanguage must be given.
http://www.wikidata.org/w/api.php?action=wbgetentities&format=json&ids=Q41055&props=labels&languages=fr
WikidataID = Q41055; // or whatever
$.getJSON("http://www.wikidata.org/w/api.php?action=wbgetentities&format=json&callback=?",
{ids: WikidataID, props: "labels", languages: wgUserLanguage},
function(data) {
WikidataIDString = WikidataID.toLowerCase();
WParticleTitle = data.entities[WikidataIDString].labels[wgUserLanguage].value;
if ( WParticleTitle != "" ) {
WPUrl = "http://" + wgUserLanguage + ".wikipedia.org/wiki/" + WParticleTitle;
} // if WParticleTitle
}); // if getJSON returns data