Module:User:Justinrleung/wikidata

Hello, you have come here looking for the meaning of the word Module:User:Justinrleung/wikidata. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:User:Justinrleung/wikidata, but we will also tell you about its etymology, its characteristics and you will know how to say Module:User:Justinrleung/wikidata in singular and plural. Everything you need to know about the word Module:User:Justinrleung/wikidata you have here. The definition of the word Module:User:Justinrleung/wikidata will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:User:Justinrleung/wikidata, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.


local export = {}

local function getWikidata(entity, property)
	if property == "arabic" then
		return mw.wikibase.getLabelByLang(entity, 'ar')
	elseif property == "wplink" then
		return mw.wikibase.getSitelink(entity, 'enwiki')
	elseif property == "coords" then --coordinates
		local coords = mw.wikibase.getBestStatements(entity, 'P625')
		local lat = coords
		local long = coords
		return lat, long
	end
end

function export.test()
	--local arabic = getWikidata('Q1617666', 'arabic')
	local lat, long = getWikidata('Q1617666', 'coords')
	--local wplink = getWikidata('Q1617666', 'wplink')
	
	return lat, long
end

return export