Module:tevo-translit: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
-- from Latin to Devanagari | |||
tt = { | |||
-- Short vowels | |||
{ "a", "" }, | |||
{ "e", "ॅ" }, | |||
{ "ei", "ॆ" }, | |||
{ "i", "ि" }, | |||
{ "o", "ॉ" }, | |||
{ "ou", "ॊ" }, | |||
{ "u", "ु"}, | |||
} | } | ||
function export.tr(text, lang, sc) | function export.tr(text, lang, sc) | ||
text = mw.ustring.lower(text) | text = mw.ustring.lower(text) | ||
Revision as of 23:45, 29 May 2026
- The following documentation is generated by Module:documentation/functions/translit. [edit]
- Useful links: subpage list • links • transclusions • testcases • sandbox
This module will transliterate Ancient Tevvic language text. It is also used to transliterate Middle Tevvic and Tevvic.
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:tevo-translit/testcases.
Functions
tr(text, lang, sc)- Transliterates a given piece of
textwritten in the script specified by the codesc, and language specified by the codelang. - When the transliteration fails, returns
nil.
-- from Latin to Devanagari
tt = {
-- Short vowels
{ "a", "" },
{ "e", "ॅ" },
{ "ei", "ॆ" },
{ "i", "ि" },
{ "o", "ॉ" },
{ "ou", "ॊ" },
{ "u", "ु"},
}
function export.tr(text, lang, sc)
text = mw.ustring.lower(text)
for _, rule in ipairs(tt) do
text = mw.ustring.gsub(text, rule[1], rule[2])
end
return text
end
return export