Մոդուլ:IPA/templates
Այս մոդուլն օգտագործվում է {{IPA}}, {{IPAchar}}.
Որովհետեւ {{IPA}} միշտ ներառում է լեզվի կոդ, կարող եք հետևել, երբ որոշակի սիմվոլներ կամ խորհրդանիշների հաջորդականություններ օգտագործվում են որոշակի լեզվի IPA տառերով: Սա թույլ է տալիս գտնել և ուղղել սխալ տառադարձումները: Հետևելու գործառույթը հայտնաբերված է Մոդուլ:IPA/tracking.
local m_IPA = require("Module:IPA")
local export = {}
-- Used for [[Template:IPAchar]] and [[Template:IPA]].
function export.IPA(frame)
local args = frame:getParent().args
-- Gather parameters
local pronunciations = {}
local notes = {}
local i = 1
local pron = args[i]; if pron == "" then pron = nil end
while pron do
table.insert(pronunciations, pron)
local note = args['n' .. i]; if note == "" then note = nil end
notes[#pronunciations] = note
i = i + 1
pron = args[i]; if pron == "" then pron = nil end
end
-- Format
if #pronunciations == 0 then
return "[[Category:Pronunciation templates without a pronunciation]]"
else
return m_IPA.IPA_multiple(pronunciations, notes)
end
end
return export