Jump to content

Модул:fa-noun

Аз Wiktionary

Documentation for this module may be created at Модул:fa-noun/doc

local m_headword = require("Module:headword")

local export = {}

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

function export.main(frame)
    local args = frame:getParent().args
    PAGENAME = mw.title.getCurrentTitle().text
    
    local head = args["head"]; if head == "" then head = nil end
    local tr = args["tr"]; if tr == "" then tr = nil end
    
    local inflections = {}
    
    if not tr then
        table.insert(inflections, "<small>([[Wiktionary:Persian transliteration|transliteration needed]])</small>")
        table.insert(categories, "Persian terms lacking transliteration")
    end
    
    return
        m_headword.format_headword(head, lang, "fa-Arab") ..
        m_headword.format_transliteration(tr) ..
        m_headword.format_inflections(inflections, lang, "fa-Arab") ..
        m_headword.format_categories(categories, lang)
end

return export