Module:Geor-translit
Appearance
- පහත දැක්වෙන උපදෙස්, Module:documentation/functions/translit මගින් ජනනය කොට ඇත. [සංස්කරණය කරන්න]
- ප්රයෝජනවත් සබැඳි: උප පිටු ලැයිස්තුව • සබැඳි • transclusions • testcases • sandbox
This module will transliterate text in the Georgian අක්ෂරක්රමය. It is used to transliterate Abkhaz, Bats, ජෝර්ජියානු, Old Georgian, Ossetian, Udi, සහ Mingrelian.
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:Geor-translit/testcases.
Functions
[සංස්කරණය]tr(text, lang, sc)
- Transliterates a given piece of
text
written in the script specified by the codesc
, and language specified by the codelang
. - When the transliteration fails, returns
nil
.
local export = {}
-- Keep synchronized with [[Module:sva-translit]]
local gsub = mw.ustring.gsub
local tt = {
["ა"]="a", ["ბ"]="b", ["გ"]="g", ["დ"]="d", ["ე"]="e", ["ვ"]="v", ["ზ"]="z", ["ჱ"]="ē",
["თ"]="t", ["ი"]="i", ["კ"]="ḳ", ["ლ"]="l", ["მ"]="m", ["ნ"]="n", ["ჲ"]="y", ["ო"]="o",
["პ"]="ṗ", ["ჟ"]="ž", ["რ"]="r", ["ს"]="s", ["ტ"]="ṭ", ["ჳ"]="wi", ["უ"]="u", ["ფ"]="p",
["ქ"]="k", ["ღ"]="ɣ", ["ყ"]="q̇", ["შ"]="š", ["ჩ"]="č", ["ც"]="c",
["ძ"]="ʒ", ["წ"]="c̣", ["ჭ"]="č̣", ["ხ"]="x", ["ჴ"]="q", ["ჯ"]="ǯ", ["ჰ"]="h", ["ჵ"]="ō", ["ჶ"]="f", ["ჷ"]="ə", ["ჸ"]="ʾ"
};
function export.tr(text, lang, sc)
-- Transliterating vowel nasalization in Bats
text = gsub(text, 'ჼ', '̃')
text = gsub(text, '<sup>ნ</sup>', '̃')
text = gsub(text, '.', tt)
return text
end
return export