This module will transliterate Macedonian language text per WT:MK TR.
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:mk-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',
='G', ='g',
='Ǵ', ='ǵ',
='D', ='d',
='E', ='e', ='È', ='è',
='Ž', ='ž',
='Z', ='z',
='Dz', ='dz',
='I', ='i', ='Ì', ='ì',
='J', ='j',
='K', ='k',
='L', ='l',
='Lj', ='lj',
='M', ='m',
='N', ='n',
='Nj', ='nj',
='O', ='o',
='P', ='p',
='R', ='r',
='S', ='s',
='T', ='t',
='Ḱ', ='ḱ',
='U', ='u',
='F', ='f',
='H', ='h',
='C', ='c',
='Č', ='č',
='Dž', ='dž',
='Š', ='š',
};
function export.tr(text, lang, sc)
return (mw.ustring.gsub(text, '.', tt))
end
return export