This module will transliterate Carpathian Rusyn language text.
The module should preferably not be called directly from templates or other modules.
To use it from a template, use {{xlit}}
.
Within a module, use Module:languages#Language:transliterate.
For testcases, see Module:rue-translit/testcases.
tr(text, lang, sc)
text
written in the script specified by the code sc
, and language specified by the code lang
.nil
.local export = {}
local tt = {
='A', ='a', ='B', ='b', ='V', ='v', ='H', ='h',
='G', ='g', ='D', ='d', ='E', ='e', ='Je', ='je',
='Jo', ='jo', ='Ž', ='ž', ='Z', ='z', ='I', ='i',
='Ji', ='ji', ='Y', ='y', ='Ŷ', ='ŷ', ='J', ='j',
='K', ='k', ='L', ='l', ='M', ='m', ='N', ='n',
='O', ='o', ='P', ='p', ='R', ='r', ='S', ='s',
='T', ='t', ='U', ='u', ='Ü', ='ü', ='F', ='f',
='X', ='x', ='C', ='c', ='Č', ='č', ='Š', ='š',
='Šč', ='šč', ='ʹ', ='ʹ', ='Ju', ='ju', ='Ja', ='ja',
='ʺ', ='ʺ',
-- neutral apostrophe, right single quotation mark, modifier letter apostrophe → modifier letter double prime
='ʺ', = 'ʺ',
-- obsolete letters
='Ô', ='ô', ='È', ='è', ='Î', ='î',
}
function export.tr(text, lang, sc)
text = mw.ustring.gsub(text, "'+", { = 'ʺ' })
return (mw.ustring.gsub(text, '.', tt))
end
return export