Module:mnw-translit

Hello, you have come here looking for the meaning of the word Module:mnw-translit. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:mnw-translit, but we will also tell you about its etymology, its characteristics and you will know how to say Module:mnw-translit in singular and plural. Everything you need to know about the word Module:mnw-translit you have here. The definition of the word Module:mnw-translit will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:mnw-translit, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

This module is in beta stage.
Its interface has been stabilised, but the module may still contain errors. Do not deploy widely until the module has been tested.

Mark-up

Traditionally, transliteration of Mon distinguishes the various reading of anusvara. By immediately following it by one of the circled letters Ⓐ, Ⓗ, Ⓞ and Ⓜ, the meaning can be selected as follows:

Combination Interpretation Mnemonic
ံⒶ Equivalent to အ် is the independent vowel <a>.
ံⒽ Equivalent to ဟ် is the letter <h>
ံⓄ The vowel is not affected by the coda being a velar consonant The resulting vowel sound (in the clear register) is /ɔ/
ံⓂ The anusvara represents a final /m/. This is the default interpretation. /m/

This mark-up can be used in the citation and usage example template {{mnw-quote}}.

In all environments, word boundaries in Burmese script text can be marked up using the HTML tag <wbr>. These tags will be converted to single spaces as part of transliteration. Note that only all lowercase tags will be recognised for conversion. This may be useful in some obscure circumstances.


local export = {}
local gsub = mw.ustring.gsub
local u = require("Module:string/char")
local letter_with_mark = "(.?)"

local pre = {
	 = "္ယ",  = "္ရ",  = "္ဝ",  = "္ဟ",
	 = "္န",  = "္မ",  = "္လ",
}

local tt1 = {
	-- consonants ; Unicode doesn't have exclusive great nya, that looks like ည with another curve, so use ည္ည as it should be.
	 = "kᵃ",  = "khᵃ",  = "gᵃ",  = "ghᵃ",  = "ṅᵃ",  = "ṅᵃ",
	 = "cᵃ",  = "chᵃ",  = "jᵃ",  = "jhᵃ",  = "ñᵃ",  = "ññᵃ",  -- ññ -> ñ later
	 = "ṭᵃ",  = "ṭhᵃ",  = "ḍᵃ",  = "ḍhᵃ",  = "ṇᵃ",
	 = "tᵃ",  = "thᵃ",  = "dᵃ",  = "dhᵃ",  = "nᵃ",
	 = "pᵃ",  = "phᵃ",  = "bᵃ",  = "bhᵃ",  = "mᵃ",
	 = "yᵃ",  = "rᵃ",  = "lᵃ",  = "wᵃ",  = "sᵃ",  = "ssᵃ",
	 = "hᵃ",  = "ḷᵃ",  = "ṗᵃ",  = "ʼᵃ",  = "ḅᵃ",
	-- independent vowels (1 char)
	 = "ʼi",  = "ʼu",
	 = "ʼe",  = "ʼo",
	-- dependent vowels and diacritics (1 char)
	 = "ā",  = "ā",  = "i",  = "iṃ",  = "ī",  = "u",  = "ū",  = "ʸ",
	 = "ao",  = "e",  = "e", 
	 = "ṃ",  = "ḥ",  = "¡",  = "¤",
	-- punctuation marks
	 = ",",  = ".", 
	-- numerals
	 = "0",  = "1",  = "2",  = "3",  = "4",
	 = "5",  = "6",  = "7",  = "8",  = "9",
	-- zero-width space (display it if it hides in a word)
	 = "‼",  = "‼",  = "‼",
}

-- ⒶⒽⓄⓂ markup for anusvara.
local ahom = {
	 = "အ်",  = "ĥ",
	 = "ံ", -- default action, at least for now.
	 = "ံ", -- default action
}
local tt2 = {
	"] = ahom, -- CAUTION: ahom is a table.
	-- vowels (2 chars)
	 = "ʼī",  = "ʼū",
	 = "o",  = "o",  = "iuw",
}

function export.tr(text, lang, sc, debug_mode)

	if type(text) == "table" then -- called directly from a template
		text = text.args
	end

--Punctuation
	text = gsub(text, "( +)", u(0xa0, 0xa0).."%1") -- 2 NBSP before spaces to widen them. 
    text = gsub(text, "<wbr/?>", " ")    -- Insert spaces between words.
	text = gsub(text, "()(ေ?ါ?ာ?)()(ေ?)", 
				function(H,b,A,a) return b..a..'h' end)
	text = gsub(text, ".", pre)
	text = gsub(text, "ဲါ", "ါဲ") -- fixed ay+aa to aa+ay; it often occurs

	for k, v in pairs(tt2) do
		text = gsub(text, k, v)
	end

	text = gsub(text, ".", tt1)

	text = gsub(text, "()ʸ", "%1y")
	text = gsub(text, "ᵃʸ", "oa")

	text = gsub(text, "ᵃ(+)", "")
	text = gsub(text, "()¤", "%1k")
	text = gsub(text, "ᵃ()", "%1")
	text = gsub(text, "ᵃ", "a")

	text = gsub(text, "iṃu", "iuṃ")
	if lang == "mnw" then --Modern Mon
		text = gsub(text, "ññ", "ñ")
	end

	return text
 
end
 
return export