Module:IPA/category documentation explained

require('strict')

local p = local lects = mw.loadData('Module:IPA/data/export')local mLang = require('Module:Lang')

function p.main(frame) local args = for k, v in pairs(frame:getParent.args) do if v ~= then args[k] = v end end local name = mw.title.getCurrentTitle.text:sub(12, -5) local lect, parent local code = args.code if not code then for _, lect2 in ipairs(lects) do if (lect2.name or lect2.extName)

name then lect = lect2 parent = lect.parent code = lect.code break end end end if not code then code = mLang._tag_from_name if code:find('^

', code) or '' ) } if key then table.insert(ret, string.format('By default, the transcriptions are linked to the %s key. Transcriptions that do not adhere to the conventions of the key must have |generic=yes.', key )) end if isCollective then table.insert(ret, string.format('The %s are a language collective. Please replace the code%s with those of more specific languages where possible.', name, code and ' (' .. code .. ')' or )) end if not code and args.container ~= 'yes' then table.insert(ret, string.format('Documentation error: language code for "%s" not found.', name )) end if args.content then table.insert(ret, args.content) end if langCat and langCatCount ~= 0 then table.insert(ret, string.format('

See also

\n* (%s)', langCat, mw.language.new('en'):formatNum(langCatCount) )) end if cat then table.insert(ret, string.format('', cat, sortkey)) end return table.concat(ret, '\n\n')end

return p