This module will transliterate Orok 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:oaa-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 single_letter_replacements = {
='A', ='a',
='B', ='b',
='V', ='v',
='E', ='e',
='Jo', ='jo',
='G', ='g',
='D', ='d',
='Ʒ', ='ʒ',
='I', ='i',
='Ī', ='ī',
='J', ='j',
='K', ='k',
='L', ='l',
='M', ='m',
='N', ='n',
='Ŋ', ='ŋ',
='Ń', ='ń',
='O', ='o',
='Ö', ='ö',
='P', ='p',
='R', ='r',
='S', ='s',
='T', ='t',
='U', ='u',
='Ū', ='ū',
='H', ='h',
='Č', ='č',
='Y', ='y',
='Ə', ='ə',
='Ju', ='ju',
='Ja', ='ja',
='ʺ', ='ʺ',
-- NOT PRESENT IN THE ORIGINAL LATINISATION --
-- non-native letters
='Ž', ='ž',
='Z', ='z',
='C', ='c',
='Š', ='š',
='Šč', ='šč',
="’", ="’",
='F', ='f',
-- non-standard letters
='Ŋ', ='ŋ',
}
function export.tr(text, lang, sc)
return (mw.ustring.gsub(text, ".", single_letter_replacements))
end
return export