require('strict')
local p = local data = mw.loadData('Module:IPA/data')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 langName = mw.title.getCurrentTitle.text:sub(12, -5) local langCode, regionCode, langData, dialectData local fullLangCode = args.code if not fullLangCode then for code, lang in pairs(data.langs) do if lang.name
langName then fullLangCode = code .. '-' .. diaCode langCode = code regionCode = diaCode langData = lang dialectData = dialect break end end if fullLangCode then break end end end end if not fullLangCode then fullLangCode = mLang._tag_from_name() if fullLangCode:sub(1, 5)
|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.', langName, fullLangCode and ' (' .. fullLangCode .. ')' )) end if not fullLangCode then table.insert(ret, string.format('Documentation error: language code for "%s" not found.', langName )) end if args.content then table.insert(ret, args.content) end if langCat and langCatCount ~= 0 then table.insert(ret, string.format('\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