This is a private module sandbox of DerekWinters, for their own experimentation. Items in this module may be added and removed at DerekWinters's discretion; do not rely on this module's stability.
local export = {}
local consonants = {
--consonants
='ᜃ', ='ᜄ', ='ᜅ',
='ᜆ', ='ᜇ', ='ᜇ', ='ᜈ',
='ᜉ', ='ᜊ', ='ᜋ',
='ᜌ', ='ᜎ',
='ᜏ', ='ᜐ', ='ᜑ',
}
local diacritics = {
--vowels
='', ='ᜒ', ='ᜒ', ='ᜓ', ='ᜓ',
}
local tt = {
--vowels
='ᜀ', ='ᜁ', ='ᜁ', ='ᜂ', ='ᜂ',
}
function export.tr(text, lang, sc)
if sc ~= "Latn" then
return nil
end
text = mw.ustring.gsub(text, 'ng', 'ŋ')
text = mw.ustring.gsub(
text,
'()'..
'(?)',
function(c, d)
if d == "" then
return consonants .. '᜔'
else
return consonants .. diacritics
end
end)
text = mw.ustring.gsub(text, '.', tt)
return text
end
return export