Module:User:DerekWinters/Baybayin

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

This is a private module sandbox of DerekWinters, for their own experimentation. Items in this module may be added and removed at DerekWinters's discretion; do not rely on this module's stability.


local export = {}

local consonants = {
--consonants
	='ᜃ', ='ᜄ', ='ᜅ',
	='ᜆ', ='ᜇ', ='ᜇ', ='ᜈ', 
	='ᜉ', ='ᜊ', ='ᜋ',
	='ᜌ', ='ᜎ',
	='ᜏ', ='ᜐ', ='ᜑ',
}

local diacritics = {
--vowels
	='', ='ᜒ', ='ᜒ', ='ᜓ', ='ᜓ',
}

local tt = {

--vowels
	='ᜀ', ='ᜁ', ='ᜁ', ='ᜂ', ='ᜂ',
}

function export.tr(text, lang, sc)
	if sc ~= "Latn" then
		return nil
	end
	text = mw.ustring.gsub(text, 'ng', 'ŋ')
	text = mw.ustring.gsub(
		text,
		'()'..
		'(?)',
		function(c, d)
			if d == "" then        
				return consonants .. '᜔'
			else
				return consonants .. diacritics
			end
		end)

	text = mw.ustring.gsub(text, '.', tt)
	
	return text
end
 
return export