local p, __output, args, data = {}, {}, {}, mw.loadData("Module:IPA symbol/data")
local id, output = function() return data.correspondences[id]["name"] end
__output.wikipage = function() return data.correspondences[id]["wikipage"] end
__output.soundfile = function() return data.correspondences[id]["soundfile"] end
__output.type = function() return data.correspondences[id]["type"] end
local function html_error(message)
  if args[2] then
    return args[2]
    return mw.ustring.format(
      '<strong class="error">Error using {{[[Template:IPA symbol|IPA symbol]]}}: %s%s</strong>'
      ,mw.title.getCurrentTitle().isContentPage and ("[[Category:International Phonetic Alphabet pages needing attention|" .. (args[1] or "") .. "]]") or ""
function p.main(frame)
  -- all input is trimmed; accepted parameters are:
  --   name              description
  --   ====              ===========
  --   (1)               the input
  --   (2)               overwrite the error message
  --   (3)               overwrite the output when input is empty
  --   output            the output, one of: input; name; wikipage; soundfile; type
  for k, v in pairs(frame:getParent().args) do
    args[k] = v and mw.text.trim(v)
  args.output = args.output or 'wikipage'
  if not args[1] or args[1] == "" then return args[3] or "" end
  id = data.symbols[args[1]]
  if not id then return html_error('"' .. args[1] .. '" not found in list') end
  return  __output[args.output] and __output[args.output]() or html_error("No such output option")
return p

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.