Module:IPA2

require "Module:Fontize"

lang_code = { ["Early High Elven"] = {"Archaic High Elven language", "Archaic High Elven", "EHE0", "Ónemeselfül"}, ["Archaic High Elven"] = {"Archaic High Elven language", "Archaic High Elven", "EHE0", "Ónemeselfül"}, ["Classical High Elven"] = { "Classical High Elven language", "Classical High Elven", "HE1", "Klasszikus Nemeselfül"}, ["Middle High Elven"] = { "Middle High Elven language", "Middle High Elven", "HE2", "Középemeselfül"}, ["High Elven"] = { "High Elven language", "High Elven", "HE3", "Nemeselfül"}, ["Proto-Human"] = { "Proto-Human language", "Proto-Human", "PRT", "Óemberiül"}, ["Old Etrandish"] = { "Old Etrandish", "Old Etrandish", "OET", "Óetrandiul"}, ["Middle Etrandish"] = { "Middle Etrandish", "Middle Etrandish", "MET", "Középetrandiul"}, ["Etrandish"] = { "Etrandish language", "Etrandish", "ET", "Etrandiul"}, ["Classical Hulran"] = { "Old Hulran", "Old Hulran", "OERT", "Óhulraiul"}, ["Old Hulran"] = { "Old Hulran", "Old Hulran", "OERT", "Óhulraiul"}, ["Late Hulran"] = { "Late Hulran language", "Late Hulran", "LERT", "Késő-hulraiul"}, ["Etrancoasti"] = { "Etrancoasti language", "Etrancoasti", "ET", "Etrancoastiul"}, ["Archaic Wood Elven"] = { "Archaic Wood Elven language", "Archaic Wood Elven", "WE2", "Óerdőelfül"}, ["Classical Wood Elven"] = { "Classical Wood Elven language", "Classical Wood Elven", "WE3", "Klasszikus Erdőelfül"}, ["Wood Elven Dragoc"] = { "Wood Elven language", "Wood Elven", "WE4", "Erdőelfül"}, ["Wood Elven Artaburro"] = { "Wood Elven language", "Wood Elven", "WEA", "Erdőelfül"}, ["Wood Elven"] = { "Wood Elven language", "Wood Elven", "WE4", "Erdőelfül"}, ["Dark Elven"] = { "Dark Elven language", "Dark Elven", "DELF", "Sötételfül"} }

function linguize(lang,txt,ipa,txt2,snd) local base_string = "" if lang == "Wood Elven" then base_string = base_string .. " Dragoc: " .. fontize("WE4",txt) .. " ; Artaburro: " .. fontize("WEA",ipa) .. " ; IPA: " .. lang_code[lang][2] .. ": ''" .. fontize(lang_code[lang][3],txt) .. " ; IPA: [" .. txt2 .. "] "    else    base_string = base_string .. "|[" .. ipa .. "] ]]" end return base_string end

function linguize_hun(lang,txt,ipa,txt2,snd) local base_string = "" if lang == "Wood Elven" or lang == "Erdőelf" then base_string = base_string .. " Dragocban: " .. fontize_hun("WE4",txt) .. " ; Artaburróban: " .. fontize("WEA",ipa) .. " ; IPA: " .. lang_code[lang][4] .. ": ''" .. fontize_hun(lang_code[lang][3],txt) .. " ; IPA: [" .. txt2 .. "] "    else    base_string = base_string .. "|[" .. ipa .. "] ]]" end return base_string end

local p = {} function p.main(frame) if (frame.args['snd'] ~= nil) and (frame.args['snd'] ~= "0") then sound = frame.args['snd'] else sound = 0 end return linguize(frame.args[1],frame.args[2],frame.args[3],frame.args[4],sound) end function p.main_hun(frame) if (frame.args['snd'] ~= nil) and (frame.args['snd'] ~= "0") then sound = frame.args['snd'] else sound = 0 end return linguize_hun(frame.args[1],frame.args[2],frame.args[3],frame.args[4],sound) end return p