Modulo:PageData
Versiokontrolo
redaktiVersionomo en Vikidatumoj: 2021-11-02
-- module variable
local pd = {
-- documentation
moduleInterface = {
suite = 'PageData',
serial = '2021-11-02',
item = 98398393
}
}
function pd.getPageData()
local page = mw.title.getCurrentTitle()
page.langObj = mw.getContentLanguage()
page.lang = page.langObj:getCode()
page.langName = mw.language.fetchLanguageName( page.lang, page.lang )
page.isRTL = page.langObj:isRTL()
page.entityId = mw.wikibase.getEntityIdForCurrentPage() -- can be nil
page.siteName = mw.site.siteName
page.globalProject = page.siteName:lower()
if page.globalProject == 'wikipedia' then
page.globalProject = 'wiki'
end
return page
end
return pd