Modul:xmr-Kursiv-translit

This module will transliterate


--[[
Transliteratschoon för Meroitsch Kursivschrift noh Hintze
]]
local M={}
 
local tk={
    ["𐦠"]='a', ["𐦡"]='e', ["𐦣"]='o', ["𐦢"]='i', ["𐦤"]='y', ["𐦥"]='w', ["𐦦"]='b', ["𐦧"]='p', ["𐦨"]='m', 
    ["𐦩"]='n', ["𐦪"]='ne', ["𐦫"]='r', ["𐦬"]='l', ["𐦭"]='ch', ["𐦮"]='kh', ["𐦱"]='se', ["𐦰"]='s', ["𐦯"]='s', ["𐦲"]='k',
    ["𐦳"]='q', ["𐦴"]='t', ["𐦵"]='te', ["𐦶"]='to', ["𐦷"]='d', [":"]=' '
};

local th={
	[""]='', [""]='', [""]='', [""]='', [""]='', [""]='', [""]='', [""]='', 
	[""]='', [""]='', [""]='', [""]='', [""]='', [""]='', ["ch"]='', ["kh"]='', 
	["𐦕"]='se', ["𐦓"]='s', ["𐦔"]='s', ["𐦖"]='k', ["𐦗"]='q', ["𐦘"]='t', ["𐦙"]='t', ["𐦚"]='te', 
	["𐦛"]='te', ["𐦜"]='to', ["𐦝"]='d', [""]='', [""]='', [":"]='', 
};

function M.tr(text, sc)--translit any words or phrases 
--	local sc = sc
    if type(text) == "table" then text = text.args[1] end
-- 	if sc == "Merc" then
	    return (mw.ustring.gsub(text, '.', tk)) 
--	else 
--	 	if sc == "Mero" then
	--	    return (mw.ustring.gsub(text, '.', th)) 
--		end
--	end
end

return M