local p = {} local function countries(args, country) local data = {AFRICA = "no", ARAB = "no", ASIA = "no", ASYA = "no", EUR = "no", default = "yes"} local yesOrNo = data[country] or data['ülke'] or data.default if yesOrNo == "no" then return args.countries or args['ülkeler'] else return nil end end local function regions(args, country) local data = {EUR = "no", AUS = "no", AUT = "no", BIH = "no", CAN = "no", CYP = "no", CZE = "no", ESP = "no", GRC = "no", HRV = "no", HUN = "no", ITA = "no", POL = "no", SGP = "no", SRB = "no", SVK = "no", SVN = "no", TUR = "no", UKR = "no", default = "yes"} if args.communities then return "Autonomouscommunities", args.communities end local yesOrNo = data[country] or data['ülke'] or data.default if yesOrNo == "no" then return "Bölgeler", args.regions or args['bölgeler'] else return "Bölgeler", nil end end local function states(args, country) local data = {AUS = "no", AUT = "no", BRA = "no", DEU = "no", IND = "no", MEX = "no", MYS = "no", USA = "no", default = "yes"} local yesOrNo = data[country] or data['ülke'] or data.default if yesOrNo == "no" then return args.states or args.eyaletler else return nil end end local function provinces(args, country) local data = {CAN = "no", CRI = "no", ESP = "no", IRN = "no", NLD = "no", PHL = "no", SAU = "no", THA = "no", TUR = "no", default = "yes"} local yesOrNo = data[country] or data['ülke'] or data.default if yesOrNo == "no" then return args.provinces or args.iller else return nil end end local function counties(args, country) local counties = args.counties local districts = args.districts local municipalities = args.municipalities local parishes = args.parishes local boroughs = args.boroughs if counties then return "Counties", counties elseif districts then return "Districts", districts elseif municipalities then return "Municipalities", municipalities elseif parishes then return "Parishes", parishes elseif boroughs then return "Boroughs", boroughs else return , nil end end local function ruralMunis(args, country) local label local province = country or if province "AB" then label "Specializedand ruralmunicipalities" elseif province "ON" then label = "Municipalities" else label = "Ruralmunicipalities" end local data = {AB = "no", BC = "no", MB = "no", NB = "no", NL = "no", ON = "no", PE = "no", QC = "no", SK = "no", default = "yes"} local yesOrNo = data[province] or data.default if yesOrNo == "no" then return label, args.rural_municipalities else return , nil end end local function divisions(args, country) local province = country or local data = {ON = "no", default = "yes"} local yesOrNo = data[province] or data.default if yesOrNo == "no" then return args.divisions else return nil end end local function cities(args, country, parameter) local data = {USA = "yes", default = "no"} local yesOrNo = data[country] or data.default if yesOrNo == "no" then return args[parameter] else return nil end end local function destinations(args, country) local label if country "GBR" then label "Primarydestinations" else label "Primarydestinations" end local data {AUS "no", GBR "no", IMN "no", IND "no", IRL "no", MYS "no", NIR "no", NPL "no", NZL "no", default "yes"} local yesOrNo data[country] or data.default if yesOrNo "no" then return label, args.destinations else return , nil end end local function lga(args, country) local labels = {SA = "LGA(s)", VIC = "LGA(s)", NSW = "LGA(s)", QLD = "LGA(s)", NT = "LGA(s)", WA = "LGA(s)", TAS = "LGA(s)", ACT = "District(s)"} local data = {AUS = "no", default = "yes"} local yesOrNo = data[country] or data['ülke'] or data.default if yesOrNo == "no" then local state = args.state or local label = labels[state] or "LGA(s)" return label, args.lga else return , nil end end local function locations(args, country) local labels = {highway = "Başlıca yerleşim yerleri", ["rural road"] = "Başlıca yerleşim yerleri", freeway = "Başlıca banliyöler", ["city highway"] = "Başlıca banliyöler", road = "Başlıca banliyöler", street = "Banliyöler"} local data = {AUS = "no", default = "yes"} local yesOrNo = data[country] or data['ülke'] or data.default if yesOrNo == "no" then local type = args.type or local label = labels[type] or "Primarydestinations" return label, args.locations else return , nil end end function p.locations(frame) local pframe = frame:getParent local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself local args = pframe.args -- the arguments passed TO the template, in the wikitext that transcludes the template local parameters = {etiket1 = "Ülkeler", etiket3 = "Eyaletler", etiket4 = "İller", etiket7 = "Bölümler", etiket8 = "Başlıca şehirler", etiket9 = "Kasabalar", etiket10 = "Köyler", child = "yes", decat = "yes", ["etiketbiçimi"] = "text-align:right", ["anabaşlık"] = "Konum"} local veri = {} local function emptyParam(param) if param == then return nil else return param end end local country = emptyParam(args.country) or emptyParam(args['ülke']) local state = emptyParam(args.state) local province = emptyParam(args.province) if not(country) then local stateParam = args.state or args.province if not(stateParam) then country = else local countryMask = require "Module:Yol bilgi kutusu/meta/mask/ülke" country = countryMask._country(stateParam, country) end end veri[1] = countries(args, country) parameters.etiket2, veri[2] = regions(args, country) veri[3] = states(args, country) veri[4] = provinces(args, country) parameters.etiket5, veri[5] = counties(args, country) parameters.etiket6, veri[6] = ruralMunis(args, province) veri[7] = divisions(args, province) veri[8] = cities(args, country, 'şehirler') or cities(args, country, 'cities') veri[9] = cities(args, country, 'towns') veri[10] = cities(args, country, 'villages') parameters.etiket11, veri[11] = destinations(args, country) parameters.etiket12, veri[12] = lga(args, country) parameters.etiket13, veri[13] = locations(args, country) local hasData = false for k,v in pairs(veri) do if v ~= then hasData = true break end end if not(hasData) then return '' end for k,v in pairs(veri) do parameters["veri" .. k] = v end local infoboxModule = require 'Modül:Bilgi kutusu' return infoboxModule.infobox(frame, parameters) end return p