local p = {}
local i18n = 
	{
		["noentity"] = "[[تصنيف:صفحات دون عنصر ويكي بيانات]]",
		["nolabel"] = "[[تصنيف:صفحات بحاجة لتسمية في ويكي بيانات]]"
	}
	
function findlabel(id)
	local label = mw.wikibase.getLabelByLang( id , 'ar' ) or ''
	if label ~= '' then return '' end
	return i18n.nolabel
end

function p.find(frame)
	local EntityId = mw.wikibase.getEntityIdForCurrentPage()
	local er = i18n.noentity
	if frame.args[1] ~= nil then er = frame.args[1] end
	if EntityId then
		return findlabel(EntityId)
	else
	-- This is the place to insert a category for articles that don't have items in Wikidata.
	-- enwiki doesn't seem to have such a category, so in this case it is empty.
	-- For other wikis, just remove the two comment dashes and insert the correct category name.
		return er
	end
end

return p