Для документации этого модуля может быть создана страница Модуль:Wikidata/links2/doc

local p = {};  function p.getSisterProjectLink( projectInterwikiLettter, projectName, frame )   -- По умолчанию старается достать ссылку на русском, иначе - на родном (P103)   local itemID = mw.text.trim(frame.args[1] or "")   local entity = mw.wikibase.getEntityObject(itemID)   if entity == nil or entity.sitelinks == nil then     return '1';   end;   local sitelink = entity.sitelinks['ru' .. projectName]   if sitelink ~= nil then     return projectInterwikiLettter .. ':' .. sitelink.title;   end;   sitelink = entity.sitelinks['en' .. projectName]   if sitelink ~= nil then     return 'en:' .. sitelink.title;   end;   if entity.claims then     local propValues = entity.claims['P103']; 	  if propValues == nil then return entity.claims;end;     if propValues ~= nil then       local codes = mw.loadData('Module:Wikidata:Dictionary/P424'); 	  if true then return '3'..propValues..'!'..codes; end;       for i, propClaim in pairs(propValues) do         if propClaim.mainsnak and propClaim.mainsnak.datavalue and propClaim.mainsnak.datavalue.value and propClaim.mainsnak.datavalue.value["numeric-id"] then           local languageWikidataId = 'Q' .. propClaim.mainsnak.datavalue.value["numeric-id"];           local codesById = codes[languageWikidataId];           if ( codesById ) then             for j, code in pairs( codesById ) do               sitelink = entity.sitelinks[code .. projectName];               if sitelink ~= nil then                 return projectInterwikiLettter .. ':' .. code .. ':' .. sitelink.title;               end;             end;           end;         end;       end;     end;   end;   return '55'; end;  function p.getWV (frame) 	local itemID = mw.text.trim(frame.args[1] or "") 	local entity = mw.wikibase.getEntityObject(itemID) 	if not entity or not entity.sitelinks then 		return '5'; 	end 	if entity.sitelinks['ru' .. 'wikivoyage'] then 		return entity.sitelinks['ru' .. 'wikivoyage'].title 	end 	return '6'; end;  function p.getWikipediaLink(frame)   return p.getSisterProjectLink( 'w', 'wiki', frame ); end;  return p;