ਸਮੱਗਰੀ 'ਤੇ ਜਾਓ

ਮੌਡਿਊਲ:ISO 639 name

ਵਿਕੀਸਰੋਤ ਤੋਂ

For {{ISO 639 name}}.


--[=[
Module description
]=]

local p = {} --p stands for package

local getArgs = require('Module:Arguments').getArgs
local language_name = require('Module:ISO_639').language_name
local error = require('Module:Error').error

--[=[
Implements [[Template:ISO 639 name]]
]=]
function p.ISO_639_name(frame)
	local code = getArgs(frame).code
	return language_name(code) or error({message = "Error: ISO code not recognized by [[Module:ISO 639]]"}) .. "[[Category:ISO 639 name template errors]]"
end

return p