local lang_mod = require ('Module:Lang');local get_args = require ('Module:Arguments').getArgs;local yesno = require ('Module:Yesno');
local p = ;local SEPARATOR = '|- style="border-bottom:1px solid #aaa"\n';local STYLE = "border-bottom:1px solid #aaa";
-- Ensure that list of names is sorted by name of language.local function sorted_pairs(t, f) local keys = for key in pairs(t) do table.insert(keys, key) end table.sort(keys, f) local i = 0 local iter = function i = i + 1; if keys[i]
local function make_language_row(frame, lang_code, lang_text) local lang_link_wikilink = lang_mod.name_from_tag() return "! style=\"padding-left:0.5em\" | "..lang_link_wikilink.. "\n| "..frame:expandTemplate;end
function p.main(frame) local args = get_args(frame) local output = ;
local header = ; table.insert(header, '
'); table.insert (header, args.name or ); table.insert (header, '\n' .. SEPARATOR); output = output .. table.concat(header) for k,v in sorted_pairs(args) do if lang_mod._is_ietf_tag(k) then output = output .. make_language_row(frame,k,v) .. '\n' .. SEPARATOR; end end output = output .. ' |
---|
return p