Modül:Wikidata2
-- settings, may differ from project to project
-- taken and adapted from ruwiki
local fileDefaultSize = '267x400px';
local outputReferences = true;
local moduleSources = require( 'Module:Sources' )
local WDS = require( 'Module:WikidataSelectors' );
local contentLanguageCode = mw. getContentLanguage():getCode();
local p = {};
local config = nil;
local formatDatavalue, formatEntityId, formatRefs, formatSnak, formatStatement, formatStatementDefault, formatProperty, getSourcingCircumstances, getPropertyDatatype, getPropertyParams, throwError, toBoolean;
local function copyTo( obj, target, skipEmpty ) for k, v in pairs( obj ) do if skipEmpty ~= true or ( v ~= nil and v ~= ) then target[k] = v; end end return target;
end
local function min( prev, next ) if ( prev == nil ) then return next; elseif ( prev > next ) then return next; else return prev; end
end
local function max( prev, next ) if ( prev == nil ) then return next; elseif ( prev < next ) then return next; else return prev; end
end
local function getConfig( section, code ) if config == nil then config = require( 'Module:Wikidata/config' ); end; if not config then config = {}; end if not section then return config; end if not code then return config[ section ] or {}; end if not config[ section ] then return nil; end return config[ section ][ code ];
end
local function getCategoryByCode( code, sortkey ) local value = getConfig( 'categories', code ); if not value or value == then return ; end if sortkey ~= nil then return. sortkey.