Module:fa-adj

Definition from Wiktionary, the free dictionary
Jump to: navigation, search
The following documentation is located at Module:fa-adj/documentation. [edit]
See also: subpages of this module.

This module implements {{fa-adj}}.


local export = {}
 
local m_common = require("Module:fa-common")
 
local lang = require("Module:languages").getByCode("fa")
 
function export.main(frame)
	local args = frame:getParent().args
	local word = mw.title.getCurrentTitle().text
	local tr = args["tr"]; if tr == "" then tr = nil end
	local c = args["c"]
 
	local categories = {}
	local infls = {}
 
	table.insert(categories, "Persian adjectives")
 
	if c == "+" then
		table.insert(infls, {
			label = 'comparative',
			accel = 'comparative-form-of' .. (tr and (' transliteration-' .. mw.uri.anchorEncode(tr) .. '-tar') or ""),
			word .. m_common.ZWNJ(word) .. "تر"
		})
 
		table.insert(infls, {
			label = 'superlative',
			accel = 'superlative-form-of' .. (tr and (' transliteration-' .. mw.uri.anchorEncode(tr) .. '-tarin') or ""),
			word .. m_common.ZWNJ(word) .. "ترین"
		})
	end
 
	return require("Module:headword").full_headword(lang, nil, nil, tr, nil, infls, categories, nil)
end
 
return export