This module will transliterate Nganasan 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:nio-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 tab = {
="A", ="B", ="V", ="G", ="D", ="Je", ="Jo", ="Ž", ="Z", ="I", ="J",
="K", ="L", ="M", ="N", ="Ŋ", ="O", ="Ö", ="P", ="R", ="S", ="T",
="U", ="Ü", ="F", ="X", ="C", ="Č", ="Š", ="Šč",="", ="Ɨ", ="ʹ",
="E", ="Ə", ="Ju", ="Ja", ="I",
='a', ='b', ='v', ='g', ='d', ='je', ='jo', ='ž', ='z', ='i', ='j',
='k', ='l', ='m', ='n', ="ŋ", ='o', ='ö', ='p', ='r', ='s', ='t',
='u', ='ü', ='f', ='x', ='c', ='č', ='š', ='šč',='', ='ɨ', ='ʹ',
='e', ='ə', ='ju', ='ja', ="ʔ", ="i",
}
function export.tr(text, lang, sc)
text = mw.ustring.gsub(text, "З̌", "Ð")
text = mw.ustring.gsub(text, "з̌", "ð")
text = mw.ustring.gsub(text, "()И", "%1Ji")
text = mw.ustring.gsub(text, "()и", "%1ji")
return (mw.ustring.gsub(text, '.' ,tab))
end
return export