मोड्युल:languages/cache

Wiktionaryबाट
Jump to navigation Jump to search

Documentation for this module may be created at मोड्युल:languages/cache/doc

local getByCode = require("Module:languages").getByCode

local langs = {}

-- Auto-create language objects: langs.en -> language object for English.
setmetatable(langs, {
	__index = function(self, key)
		local lang = getByCode(key) or false
		self[key] = lang
		return lang
	end
})

return langs