This module will transliterate Ulch 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:ulc-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 u = mw.ustring.char
local gsub = mw.ustring.gsub
local RING = u(0x030A)
local single_letter_replacements = {
='A', ='a', ='Ā', ='ā', ='V', ='v',
='E', ='e', ='Jo', ='jo', ='Ē', ='ē', ='Jō', ='jō',
='G', ='g', ='F', ='f',
='B', ='ʙ', ='D', ='d',
='I', ='i', ='Ī', ='ī', ='C', ='c',
='J', ='j', ='K', ='k', ='L', ='l', ='Q', ='q',
='M', ='m', ='N', ='n', ='Ŋ', ='ŋ', ='O', ='o', ='Ō', ='ō',
='P', ='p', ='R', ='r', ='S', ='s',
='T', ='t', ='U', ='u', ='H', ='h', ='Ū', ='ū',
='Č', ='č', ='X̌', ='x̌', ='Y', ='y',
='Ə', ='ə', ='Ju', ='ju',='Ja', ='ja', ='ʺ', ='ʺ',
='Ē', ='е̄', ='Jū', ='jū',='Jā', ='jā',
-- NOT PRESENT IN THE ORIGINAL LATINISATION --
-- non-native letters
="’", ="’", ='Ž', ='ž', ='Z', ='z', ='Š', ='š', ='Šč', ='šč',
-- non-standard letters
='Γ', ='γ', ='Ŋ', ='ŋ',
='Q', ='q', ='Ǧ', ='ǧ',
}
function export.tr(text, lang, sc)
text = gsub(text, ".", single_letter_replacements)
return text
end
return export