This module will transliterate text in the Devanagari script.
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:Deva-Kthi-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 conv = {
='๐', ='๐', ='๐', ='๐', ='๐',
='๐', ='๐', ='๐', ='๐', ='๐',
='๐', ='๐', ='๐', ='๐', ='๐',
='๐', ='๐', ='๐ ', ='๐ก', ='๐ข',
='๐ฃ', ='๐ค', ='๐ฅ', ='๐ฆ', ='๐ง',
='๐จ', ='๐ฉ', ='๐ช', ='๐ซ',
='๐ฌ', ='๐ญ', ='๐ฎ', ='๐ฏ',
='๐ฐ', ='๐ฑ', ='๐ฒ', ='๐ณ', ='๐ด', ='๐ต', ='๐ถ', ='๐ท', ='๐ธ', ='๐น', ='๐บ',
-- vowels
='๐', ='๐', ='๐
', ='๐', ='๐', ='๐', ='๐ฉ๐ฒ', ='๐', ='๐', ='๐', ='๐',
-- chandrabindu
='๐',
-- anusvara
='๐',
-- visarga
='๐',
--punctuation
='๐',
='๐',
}
function export.tr(text, lang, sc)
text = mw.ustring.gsub(
text,
".",
function(c)
return conv
end)
return text
end
return export