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"}, ["Gabyrian"] = { "Gabyrian language", "Gabyrian", "GAB", "Gabyriul"} }

function linguize(lang,txt,ipa,txt2,snd,loc_txt,loc_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 if snd ~= 0 then base_string = base_string .. "  " end if loc_txt ~= nil and loc_txt ~= 0 then if loc_snd ~= nil and loc_snd ~= 0 then base_string = base_string .. " ; Locally: " .. "[" .. loc_txt .. "]  " else base_string = base_string .. " ; Locally: [" .. loc_txt .. "] "   	end end return base_string end

function linguize_hun(lang,txt,ipa,txt2,snd,loc_txt,loc_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 if loc_txt ~= nil and loc_txt ~= 0 then if loc_snd ~= nil and loc_snd ~= 0 then base_string = base_string .. "; Helyileg: " .. "[" .. loc_txt .. "] " else base_string = base_string .. "; Helyileg: <span title=\"Nemzetiközi kiejtési ábécében való reprezentáció (IPA)\" class=\"IPA\"><font face=\"DoulosSIL\">[" .. loc_txt .. "] "   	end 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 if (frame.args['loc_txt'] ~= nil) and (frame.args['loc_txt'] ~= "0") then loc_txt = frame.args['loc_txt'] else loc_txt = 0 end if (frame.args['loc_snd'] ~= nil) and (frame.args['loc_snd'] ~= "0") then loc_snd = frame.args['loc_snd'] else loc_snd = 0 end return linguize(frame.args[1],frame.args[2],frame.args[3],frame.args[4],sound,loc_txt,loc_snd) 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 if (frame.args['loc_txt'] ~= nil) and (frame.args['loc_txt'] ~= "0") then loc_txt = frame.args['loc_txt'] else loc_txt = 0 end if (frame.args['loc_snd'] ~= nil) and (frame.args['loc_snd'] ~= "0") then loc_snd = frame.args['loc_snd'] else loc_snd = 0 end return linguize_hun(frame.args[1],frame.args[2],frame.args[3],frame.args[4],sound,loc_txt,loc_snd) end return p