Module:Language/Names

From Feed The Beast Wiki
Jump to: navigation, search

Documentation for this module may be created at Module:Language/Names/doc

-- This table is used for overrides of language codes provided by MediaWiki.
-- If not found in this table, it will check MediaWiki instead with the metatable.
local p = {
	['es-ni'] = {'Nicaraguan Spanish', 'español nicaragüense'},
	['tl-b'] = {'Tagalog (Baybayin)', 'ᜆᜄᜎᜓᜄ᜔'},
}

local metatable = {
	__index = function(overrides, key)
		local localized = mw.language.fetchLanguageName(key)
		if (localized == '') then
			return nil
		end
		local english = mw.language.fetchLanguageName(key, 'en')
		return {english, localized}
	end
}

setmetatable(p, metatable);
return p;