Jump to content

Module:ATC code to template name

From Wikipedia, the free encyclopedia

-- this module provides a lookup from ATC codes to their associated navbox templates --localdata=mw.loadData("Module:ATC code to template name/data")p={}functionp.translate(frame)localname=frame.args[1]for_,vinpairs(data)doifv.code==namethenifv.templatethenreturnframe:expandTemplate{title=v.template}elseerror("ATC code not specific enough - please use one further character (example: instead of M01, use M01A)")returnendendenderror("Invalid ATC code (or the ATC code does not have a template matched to it)")returnendreturnp
close