This module will transliterate text in one of the Khanty languages per WT:KCA TR. It is also used to transliterate Eastern Khanty, Northern Khanty, and Southern Khanty.
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:kca-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", ="Ä", ="Ă", ="B", ="W", ="G", ="D",
="a", ="ä", ="ă", ="b", ="w", ="g", ="d",
="Je",="Jo",="Ə", ="Jə",="Ž", ="Z", ="I",
="je",="jo",="ə", ="jə",="ž", ="z", ="i",
="I", ="J", ="K", ="Ḳ", ="Ḳ", ="L", ="Ł",
="i", ="j", ="k", ="ḳ", ="ḳ", ="l", ="ł",
="Ł", ="Lj",="M", ="N", ="Ṇ", ="Ṇ", ="Nj",
="ł", ="lj",="m", ="n", ="ṇ", ="ṇ", ="nj",
="Nj",="O", ="Ö", ="Ø", ="Ø̈", ="Ø̆", ="P",
="nj",="o", ="ö", ="ø", ="ø̈", ="ø̆", ="p",
="R", ="S", ="Ş", ="T", ="Ț", ="Tj",="U",
="r", ="s", ="ş", ="t", ="ț", ="tj",="u",
="Ü", ="Ŭ", ="F", ="H", ="Ḥ", ="Ḥ", ="C",
="ü", ="ŭ", ="f", ="h", ="ḥ", ="ḥ", ="c",
="Č", ="Č̣", ="Š", ="Sj",="”", ="Y", ="’",
="č", ="č̣", ="š", ="sj",="”", ="y", ="’",
="E", ="Ê", ="Ë", ="Ju",="Jŭ",="Ja",="Jă", ="Jä",
="e", ="ê", ="ë", ="ju",="jŭ",="ja",="jă", ="jä",
};
function export.tr(text, lang, sc)
return (mw.ustring.gsub(text, '.', tt))
end
return export