10,731
edits
No edit summary |
TheNightAvl (talk | contribs) No edit summary |
||
Line 11: | Line 11: | ||
[2] = {list = true}, | [2] = {list = true}, | ||
} | } | ||
function get_SAMPAd(ipa) | |||
local correspondences = { | |||
["g"] = "ɡ", | |||
[":"] = "ː", | |||
["'"] = "ˈ", | |||
} | |||
for from, to in pairs(correspondences) do | |||
ipa = mw.ustring.gsub(ipa, from, to) | |||
end | |||
return ipa | |||
end | |||
function format_ipa(language, ipa, nolarge, nopre, linked) | function format_ipa(language, ipa, nolarge, nopre, linked) | ||
Line 24: | Line 38: | ||
if i > 1 then out = out .. ", " end | if i > 1 then out = out .. ", " end | ||
out = out .. '<span class="' .. class .. '">' | out = out .. '<span class="' .. class .. '">' | ||
i_ipa = get_SAMPAd(i_ipa) | |||
if linked then | if linked then | ||
out = out .. "[[" .. language_pron .. "|" .. i_ipa .. "]]" | out = out .. "[[" .. language_pron .. "|" .. i_ipa .. "]]" |