localexport={}localm_qualifier=require("Module:qualifier")functionexport.format_qualifiers(qualifiers)localm_data=mw.loadData("Module:accent qualifier/data")iftype(qualifiers)~="table"thenqualifiers={qualifiers}endlocalaccents={}localcategories={}for_,accentinipairs(qualifiers)dolocaldata-- Replace an alias with the label that has a data table.ifm_data.aliases[accent]thenaccent=m_data.aliases[accent]end-- Retrieve the label's data table.ifm_data.labels[accent]thendata=m_data.labels[accent]end-- Use the link and displayed text in the data table, if they exist.ifdatathenifdata.linkthentable.insert(accents,"[[w:"..data.link.."|"..(data.displayordata.link).."]]")elseifdata.displaythentable.insert(accents,data.display)end--[[ if data[accent] then if data[accent].type == "sound change" then table.insert(categories, lang:getCanonicalName() .. " terms with pronunciations exhibiting " .. accent) end end ]]elsetable.insert(accents,accent)endendreturnm_qualifier.format_qualifier(accents)end-- Called by {{accent}} or {{a}}.functionexport.show(frame)localargs=frame.getParentandframe:getParent().argsorframeif(notargs[1]orargs[1]=="")andmw.title.getCurrentTitle().nsText=="แม่แบบ"thenreturnm_qualifier.format_qualifier{'{{{1}}}'}endlocalparams={[1]={required=true,list=true}}args=require("Module:parameters").process(args,params)returnexport.format_qualifiers(args[1])endreturnexport