Модул:languages/JSON

Документација модула[прикажи] [уреди] [историја] [освежи]

Converts language data to JSON.

The data can be fetched using an expand templates API call, e.g. [1]

local export = {}

function export.getByCode(frame)
	local args = frame.args
	local langcode = args[1] or error("Језички код није специфициран. Молимо проследите параметер 1 у модул.")
	local lang = require("Модул:languages").getByCode(langcode) or error("Језички код није нађен")
	
	return lang:toJSON()
end

return export