Jump to content

Module:User:Erutuon/09

From Wiktionary, the free dictionary


local export = {}

local letters = [[
Ꝺ D
ꝺ d
Ꝼ F
ꝼ f
Ᵹ G
ᵹ g
Ꝿ G
ꝿ g
Ꞃ R
ꞃ r
Ꞅ S
ꞅ s
Ꞇ T
ꞇ t]]

local map = {}
for a, b in letters:gmatch("%f[^%z\n](%S+)%s+(%S+)") do
	map[a] = b
end

function export.convert(frame)
	return (mw.ustring.gsub(frame.args[1] or frame:getParent().args[1],
		".",
		map))
end

return export