Module:qay-pron: Difference between revisions

No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 21: Line 21:
local function laxen(v)
local function laxen(v)
local otc = {}
local otc = {}
local switch = {["e"] = "ɛ", ["i"] = "ɪ", ["o"] = "ɔ", ["u"] = "ʊ", ["(.)"] = "%1"}
local switch = {["e"] = "ɛ", ["i"] = "ɪ", ["o"] = "ɔ", ["u"] = "ʊ"}
 
 
for vc in gmatch(v, ".") do
for vc in gmatch(v, ".") do
vc = gsub(vc, vc, switch[vc])
if switch[vc] then vc = gsub(vc, vc, switch[vc]) end
table.insert(otc, vc)
table.insert(otc, vc)
end
end
Line 151: Line 151:
table.insert(IPA_args, {pron = '[' .. phonetic .. ']'})
table.insert(IPA_args, {pron = '[' .. phonetic .. ']'})


return "* " .. m_IPA.format_IPA_full(lang, IPA_args)
return "* " .. m_IPA.format_IPA_full({lang = lang, items = IPA_args})
end
end


return export
return export