localp={}localsubtypeDefaults={Alt="جایگزین",Bus="تجاری",Byp="کنارگذر",Conn="رابط",Emerg="اضطراری",Loop="کمربندی",Old="قدیمی",Opt="انتخابی",Scenic="توریستی",Spur="اختصاصی",Temp="موقت",Toll="عوارضی",Truck="ترابری"}functionp._subtype(subtype,subtypes)setmetatable(subtypes,{__index=subtypeDefaults})returnsubtypes[subtype]endfunctionp.subtype(frame)localpframe=frame:getParent()localconfig=frame.args-- the arguments passed BY the template, in the wikitext of the template itselflocalargs=pframe.args-- the arguments passed TO the template, in the wikitext that transcludes the templatelocalsubtype=config.subtypeorconfig['زیرنوع']orargs.subtypeorargs['زیرنوع']localsubtypes={}subtypes.Alt=args.altorargs['جایگزین']subtypes.Bus=args.busorargs['اتوبوس']subtypes.Byp=args.byporargs['کنارگذر']subtypes.Conn=args.conorargs['رابط']subtypes.Emerg=args.emeorargs['اضطراری']subtypes.Loop=args.loporargs['کمربندی']subtypes.Old=args.oldorargs['قدیمی']subtypes.Opt=args.optorargs['اختیاری']subtypes.Scenic=args.sceorargs['توریستی']orargs['خوشمنظره']subtypes.Spur=args.sprorargs['اختصاصی']subtypes.Temp=args.tmporargs['موقت']subtypes.Toll=args.tolorargs['عوارضی']subtypes.Truck=args.trkorargs['ترابری']returnp._subtype(subtype,subtypes)or''endreturnp