localexport={}locallang=require("Module:languages").getByCode("th")localPAGENAME=mw.title.getCurrentTitle().textlocalfunctiongetHomophones(reading)returnrequire('Module:th-hom/data')[reading]or{}end-- can be called from another modulefunctionexport.makeList(reading)localresult={}localcategories={}localhomList=getHomophones(reading)if#homList>1thenfor_,terminipairs(homList)do-- skip if same wordifterm~=PAGENAMEthentable.insert(result,require('Module:links').full_link({lang=lang,term=term,tr='-'}))endendifmw.title.getCurrentTitle().namespace==0thentable.insert(categories,"ศัพท์ภาษาไทยที่มีคำพ้องเสียง")endendreturntable.concat(result,', ')..require('Module:utilities').format_categories(categories,lang)endfunctionexport.show(frame)localargs=frame:getParent().argslocalreading=args[1]orPAGENAMElocaloutput=export.makeList(reading)ifoutput~=''thenoutput='คำพ้องเสียง: '..outputendreturnoutputendreturnexport