Module:Main: Difference between revisions
Content deleted Content added
add similar function for Template:Infobox |
add page_language function |
||
Line 29:
local expanded = frame:expandTemplate{ title = page, args = frame.args }
return expanded
end
Line 58:
local expanded = frame:expandTemplate{ title = page, args = frame.args }
return expanded
end
function p.page_language( frame )
local full_title = mw.title.getCurrentTitle().prefixedText
local t = mw.text.split( full_title, '/' )
local lang = t[#t]
if mw.language.isKnownLanguageTag( lang ) then
return lang
▲ else
return 'en'
▲ end
end
|