Module:Infobox road/link/MEX

local p = {}

local format = mw.ustring.format

local typesModule = require "Module:Infobox road/link/defs" local Country = typesModule.Country local Link = typesModule.Link

local links = Country:new do -- Federal Highways local type = Link:new{formatStr = "Mexican Federal Highway %s"} links["Federal Highway"] = type links["Hwy"] = type links["FH"] = type end -- Federal Highways do -- State Highways local function stateName(args) local states = mw.loadData("Module:Infobox road/areamask/MEX") args.stateName = states.states[args.state] end links["SH"] = Link:new{formatStr = "%s State Highway %s", formatArgs = {"stateName", "route"}, preprocessors = {stateName}} end -- State Highways

p.links = links return p