Module:iu-spel

local export = {} local lang = require("Module:languages").getByCode("iu")

function export.spelling(s_input) if not s_input:getParent.args[1] then local word = mw.title.getCurrentTitle.text local output = "" local i = 1

while i <= string.len(word) do			first1 = string.sub(word, i, i)			first2 = string.sub(word, i, i + 1) first3 = string.sub(word, i, i + 2) first4 = string.sub(word, i, i + 3) first5 = string.sub(word, i, i + 4)

if first2 == "aa" then output = output .. "ᐋ" i = i + 2 elseif first2 == "ai" then output = output .. "ᐁ" i = i + 2 elseif first1 == "a" then output = output .. "ᐊ" i = i + 1 elseif first2 == "ii" then output = output .. "ᐄ" i = i + 2 elseif first1 == "i" then output = output .. "ᐃ" i = i + 1 elseif first2 == "uu" then output = output .. "ᐆ" i = i + 2 elseif first1 == "u" then output = output .. "ᐅ" i = i + 1 elseif first3 == "paa" then output = output .. "ᐹ" i = i + 3 elseif first3 == "pai" then output = output .. "ᐯ" i = i + 3 elseif first2 == "pa" then output = output .. "ᐸ" i = i + 2 elseif first3 == "pii" then output = output .. "ᐲ" i = i + 3 elseif first2 == "pi" then output = output .. "ᐱ" i = i + 2 elseif first3 == "puu" then output = output .. "ᐴ" i = i + 3 elseif first2 == "pu" then output = output .. "ᐳ" i = i + 2 elseif first3 == "taa" then output = output .. "ᑖ" i = i + 3 elseif first3 == "tai" then output = output .. "ᑌ" i = i + 3 elseif first2 == "ta" then output = output .. "ᑕ" i = i + 2 elseif first3 == "tii" then output = output .. "ᑏ" i = i + 3 elseif first2 == "ti" then output = output .. "ᑎ" i = i + 2 elseif first3 == "tuu" then output = output .. "ᑑ" i = i + 3 elseif first2 == "tu" then output = output .. "ᑐ" i = i + 2 elseif first3 == "kaa" then output = output .. "ᑳ" i = i + 3 elseif first3 == "kai" then output = output .. "ᑫ" i = i + 3 elseif first2 == "ka" then output = output .. "ᑲ" i = i + 2 elseif first3 == "kii" then output = output .. "ᑮ" i = i + 3 elseif first2 == "ki" then output = output .. "ᑭ" i = i + 2 elseif first3 == "kuu" then output = output .. "ᑰ" i = i + 3 elseif first2 == "ku" then output = output .. "ᑯ" i = i + 2 elseif first4 == "ngaa" then output = output .. "ᖔ" i = i + 4 elseif first4 == "ngai" then output = output .. "ᙰ" i = i + 4 elseif first3 == "nga" then output = output .. "ᖓ" i = i + 3 elseif first4 == "ngii" then output = output .. "ᖐ" i = i + 4 elseif first3 == "ngi" then output = output .. "ᖏ" i = i + 3 elseif first4 == "nguu" then output = output .. "ᖒ" i = i + 4 elseif first3 == "ngu" then output = output .. "ᖑ" i = i + 3 elseif first5 == "nngaa" then output = output .. "ᙶ" i = i + 5 elseif first4 == "nnga" then output = output .. "ᙵ" i = i + 4 elseif first5 == "nngii" then output = output .. "ᙲ" i = i + 5 elseif first4 == "nngi" then output = output .. "ᙱ" i = i + 4 elseif first5 == "nnguu" then output = output .. "ᙴ" i = i + 5 elseif first4 == "nngu" then output = output .. "ᙳ" i = i + 4 elseif first3 == "gaa" then output = output .. "ᒑ" i = i + 3 elseif first3 == "gai" then output = output .. "ᒉ" i = i + 3 elseif first2 == "ga" then output = output .. "ᒐ" i = i + 2 elseif first3 == "gii" then output = output .. "ᒌ" i = i + 3 elseif first2 == "gi" then output = output .. "ᒋ" i = i + 2 elseif first3 == "guu" then output = output .. "ᒎ" i = i + 3 elseif first2 == "gu" then output = output .. "ᒍ" i = i + 2 elseif first3 == "maa" then output = output .. "ᒫ" i = i + 3 elseif first3 == "mai" then output = output .. "ᒣ" i = i + 3 elseif first2 == "ma" then output = output .. "ᒪ" i = i + 2 elseif first3 == "mii" then output = output .. "ᒦ" i = i + 3 elseif first2 == "mi" then output = output .. "ᒥ" i = i + 2 elseif first3 == "muu" then output = output .. "ᒨ" i = i + 3 elseif first2 == "mu" then output = output .. "ᒧ" i = i + 2 elseif first3 == "naa" then output = output .. "ᓈ" i = i + 3 elseif first3 == "nai" then output = output .. "ᓀ" i = i + 3 elseif first2 == "na" then output = output .. "ᓇ" i = i + 2 elseif first3 == "nii" then output = output .. "ᓃ" i = i + 3 elseif first2 == "ni" then output = output .. "ᓂ" i = i + 2 elseif first3 == "nuu" then output = output .. "ᓅ" i = i + 3 elseif first2 == "nu" then output = output .. "ᓄ" i = i + 2 elseif first3 == "saa" then output = output .. "ᓵ" i = i + 3 elseif first3 == "sai" then output = output .. "ᓭ" i = i + 3 elseif first2 == "sa" then output = output .. "ᓴ" i = i + 2 elseif first3 == "sii" then output = output .. "ᓰ" i = i + 3 elseif first2 == "si" then output = output .. "ᓯ" i = i + 2 elseif first3 == "suu" then output = output .. "ᓲ" i = i + 3 elseif first2 == "su" then output = output .. "ᓱ" i = i + 2 elseif first3 == "laa" then output = output .. "ᓛ" i = i + 3 elseif first3 == "lai" then output = output .. "ᓓ" i = i + 3 elseif first2 == "la" then output = output .. "ᓚ" i = i + 2 elseif first3 == "lii" then output = output .. "ᓖ" i = i + 3 elseif first2 == "li" then output = output .. "ᓕ" i = i + 2 elseif first3 == "luu" then output = output .. "ᓘ" i = i + 3 elseif first2 == "lu" then output = output .. "ᓗ" i = i + 2 elseif first3 == "jaa" then output = output .. "ᔮ" i = i + 3 elseif first3 == "jai" then output = output .. "ᔦ" i = i + 3 elseif first2 == "ja" then output = output .. "ᔭ" i = i + 2 elseif first3 == "jii" then output = output .. "ᔩ" i = i + 3 elseif first2 == "ji" then output = output .. "ᔨ" i = i + 2 elseif first3 == "juu" then output = output .. "ᔫ" i = i + 3 elseif first2 == "ju" then output = output .. "ᔪ" i = i + 2 elseif first3 == "vaa" then output = output .. "ᕚ" i = i + 3 elseif first3 == "vai" then output = output .. "ᕓ" i = i + 3 elseif first2 == "va" then output = output .. "ᕙ" i = i + 2 elseif first3 == "vii" then output = output .. "ᕖ" i = i + 3 elseif first2 == "vi" then output = output .. "ᕕ" i = i + 2 elseif first3 == "vuu" then output = output .. "ᕘ" i = i + 3 elseif first2 == "vu" then output = output .. "ᕗ" i = i + 2 elseif first3 == "raa" then output = output .. "ᕌ" i = i + 3 elseif first3 == "rai" then output = output .. "ᕃ" i = i + 3 elseif first2 == "ra" then output = output .. "ᕋ" i = i + 2 elseif first3 == "rii" then output = output .. "ᕇ" i = i + 3 elseif first2 == "ri" then output = output .. "ᕆ" i = i + 2 elseif first3 == "ruu" then output = output .. "ᕉ" i = i + 3 elseif first2 == "ru" then output = output .. "ᕈ" i = i + 2 elseif first3 == "qaa" then output = output .. "ᖄ" i = i + 3 elseif first3 == "qai" then output = output .. "ᙯ" i = i + 3 elseif first2 == "qa" then output = output .. "ᖃ" i = i + 2 elseif first3 == "qii" then output = output .. "ᖀ" i = i + 3 elseif first2 == "qi" then output = output .. "ᕿ" i = i + 2 elseif first3 == "quu" then output = output .. "ᖂ" i = i + 3 elseif first2 == "qu" then output = output .. "ᖁ" i = i + 2 elseif first3 == "łaa" then output = output .. "ᖥ" i = i + 3 elseif first2 == "ła" then output = output .. "ᖤ" i = i + 2 elseif first3 == "łii" then output = output .. "ᖡ" i = i + 3 elseif first2 == "łi" then output = output .. "ᖠ" i = i + 2 elseif first3 == "łuu" then output = output .. "ᖣ" i = i + 3 elseif first2 == "łu" then output = output .. "ᖢ" i = i + 2 elseif first1 == "h" then output = output .. "ᐦ" i = i + 1 elseif first1 == "p" then output = output .. "ᑉ" i = i + 1 elseif first1 == "t" then output = output .. "ᑦ" i = i + 1 elseif first1 == "k" then output = output .. "ᒃ" i = i + 1 elseif first2 == "ng" then output = output .. "ᖕ" i = i + 2 elseif first3 == "nng" then output = output .. "ᖖ" i = i + 3 elseif first1 == "g" then output = output .. "ᒡ" i = i + 1 elseif first1 == "m" then output = output .. "ᒻ" i = i + 1 elseif first1 == "n" then output = output .. "ᓐ" i = i + 1 elseif first1 == "s" then output = output .. "ᔅ" i = i + 1 elseif first1 == "l" then output = output .. "ᓪ" i = i + 1 elseif first1 == "j" then output = output .. "ᔾ" i = i + 1 elseif first1 == "v" then output = output .. "ᕝ" i = i + 1 elseif first1 == "r" then output = output .. "ᕐ" i = i + 1 elseif first1 == "q" then output = output .. "ᖅ" i = i + 1 elseif first1 == "ł" then output = output .. "ᖦ" i = i + 1 else output = output .. first1 i = i + 1 end end

return s_input:expandTemplate{ title = "spelling of", args = {[1] = "iu", [2] = "Latin", [3] = output}} else return s_input:expandTemplate{ title = "spelling of", args = {[1] = "iu", [2] = "Latin", [3] = s_input:getParent.args[1]}} end end

return export