Module:Main: Difference between revisions
Content deleted Content added
add page_language function |
add get_tax_message function |
||
Line 54:
else
page = p5
end
local expanded = frame:expandTemplate{ title = page, args = frame.args }
return expanded
end
function p.get_tax_message( frame )
local tax_message = frame.args.tax_message
local language = frame.args.language
local country = frame.args.country
if ( tax_message == '' and country == 'FR' ) then
tax_message = 'FR'
end
local p1 = mw.title.new( 'Template:Footer/Tax/' .. tax_message .. language )
local p2 = mw.title.new( 'Template:Footer/Tax/LinkOnly' )
if p1.exists then
page = p1
else
page = p2
end
|