Module:Lang: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
(+support for private use tags;)
(new lang_xx() entry points;)
Line 663: Line 663:
]]
]]


function p.lang_xx (frame)
function _lang_xx (frame)
local args = getArgs(frame, {parentFirst= true}); -- parameters in the template override parameters set in the {{#invoke:}}; is that the right thing to do?
local args = getArgs(frame, {parentFirst= true}); -- parameters in the template override parameters set in the {{#invoke:}}; is that the right thing to do?


Line 796: Line 796:
return table.concat (out); -- put it all together and done
return table.concat (out); -- put it all together and done
end
end


--[[--------------------------< L A N G _ X X >----------------------------------------------------------------

Entry point for those {{lang-xx}} templates that have not been converted to call either of lang_xx_normal() or
lang_xx_italic(). Sets the initial style state to italic. When all {{lang-xx}} template that use this module
have been converted, this finction can go away.

]]

function p.lang_xx (frame)
initial_style_state = 'italic';
return _lang_xx (frame);
end


--[[--------------------------< L A N G _ X X _ I T A L I C >--------------------------------------------------

Entry point for those {{lang-xx}} templates that have been converted to call lang_xx_italic(). Sets the initial
style state to italic.

]]

function p.lang_xx_italic (frame)
initial_style_state = 'italic';
return _lang_xx (frame);
end


--[[--------------------------< L A N G _ X X _ N O R M A L >--------------------------------------------------

Entry point for those {{lang-xx}} templates that have been converted to call lang_xx_normal(). Sets the initial
style state to normal.

]]

function p.lang_xx_normal (frame)
initial_style_state = 'normal';
return _lang_xx (frame);
end



return p;
return p;