Template:Infobox road/doc/country

From Wikipedia, the free encyclopedia

Documentation related to the "country" parameter. Look up a country on ISO 3166-1 alpha-3 to find the correct code.

Supported countries[edit]

As of May 16, 2023. † denotes there is no official ISO 3166-1 alpha-3 code.

Country name ISO 3166-1
alpha-3 code
(Param value)
Links Ready for migration
Afghanistan AFG Yes
Åland Islands ALA Yes
Albania ALB Yes
Algeria DZA Yes
Andorra AND Yes
Angola AGO No
Antigua and Barbuda ATG No
Argentina ARG Yes
Armenia ARM Yes
Aruba ABW No
Asian Highway Network ASIA† Yes
Australia AUS Yes
Austria AUT Yes
Azerbaijan AZE Yes
Bahamas BHS No
Bahrain BHR No
Bangladesh BGD Yes
Barbados BRB No
Belarus BLR Yes
Belgium BEL Yes
Belize BLZ Yes
Benin BEN Yes
Bhutan BTN No
Bolivia BOL Yes
Bosnia and Herzegovina BIH Yes
Botswana BWA Yes
Brazil BRA Yes
Brunei BRN Yes
Bulgaria BGR Yes
Burkina Faso BFA No
Burundi BDI No
Cabo Verde CPV Yes
Cambodia KHM No
Cameroon CMR No
Canada CAN Yes
Central African Republic CAF No
Chad TCD No
Chile CHL Yes
China CHN No
Colombia COL No
Comoros COM No
Costa Rica CRI No
Croatia HRV No
Cuba CUB No
Cyprus CYP No
Czech Republic CZE No
Democratic Republic of the Congo COD No
Denmark DNK No
Djibouti DJI No
Dominica DMA No
Dominican Republic DOM No
Ecuador ECU No
Egypt EGY No
El Salvador SLV No
England ENG No
Equatorial Guinea GNQ No
Eritrea ERI No
Estonia EST No
Eswatini SWZ No
Ethiopia ETH No
European E-roads EUR† No
Federated States of Micronesia FSM No
Fiji FJI No
Finland FIN No
France FRA No
French Guiana GUF No
Gabon GAB No
Gambia GMB No
Georgia GEO No
Germany DEU No
Ghana GHA No
Gibraltar GIB No
Greece GRC No
Grenada GRD No
Guadeloupe GLP No
Guatemala GTM No
Guernsey GGY No
Guinea GIN No
Guinea-Bissau GNB No
Guyana GUY No
Haiti HTI No
Honduras HND No
Hong Kong HKG No
Hungary HUN No
Iceland ISL No
India IND No
Indonesia IDN No
Iran IRN No
Iraq IRQ No
Ireland IRL No
Isle of Man IMN No
Israel ISR No
Italy ITA No
Jamaica JAM No
Japan JPN No
Jersey JEY No
Jordan JOR No
Kazakhstan KAZ No
Kenya KEN No
Kiribati KIR No
Kosovo KOS† No
Kuwait KWT No
Kyrgyzstan KGZ No
Laos LAO No
Latvia LVA No
Lebanon LBN No
Lesotho LSO No
Liberia LBR No
Libya LBY No
Liechtenstein LIE No
Lithuania LTU No
Luxembourg LUX No
Madagascar MDG No
Malawi MWI No
Malaysia MYS No
Maldives MDV No
Mali MLI No
Malta MLT No
Marshall Islands MHL No
Mauritania MRT No
Mauritius MUS No
Mayotte MYT No
Martinique MTQ No
Mexico MEX No
Moldova MDA No
Monaco MCO No
Mongolia MNG No
Montenegro MNE No
Morocco MAR No
Mozambique MOZ No
Myanmar MMR No
Namibia NAM No
Nauru NRU No
Nepal NPL No
Netherlands NLD No
New Zealand NZL No
Nicaragua NIC No
Niger NER No
Nigeria NGA No
North Korea PRK No
North Macedonia MKD No
Northern Ireland NIR No
Norway NOR No
Oman OMN No
Pakistan PAK No
Palau PLW No
Palestine PSE No
Panama PAN No
Papua New Guinea PNG No
Paraguay PRY No
Peru PER No
Philippines PHL No
Poland POL No
Portugal PRT No
Qatar QAT No
Republic of the Congo COG No
Réunion REU No
Romania ROU No
Russia RUS No
Rwanda RWA No
Saint Kitts and Nevis KNA No
Saint Lucia LCA No
Saint Vincent and the Grenadines VCT No
Samoa WSM No
San Marino SMR No
São Tomé and Príncipe STP No
Saudi Arabia SAU No
Scotland SCT No
Senegal SEN No
Serbia SRB No
Solomon Islands SLB No
Somalia SOM No
Singapore SGP No
Slovakia SVK No
Slovenia SVN No
South Africa ZAF No
South Korea KOR No
South Sudan SSD No
Spain ESP No
Sri Lanka LKA No
Sudan SDN No
Suriname SUR No
Sweden SWE No
Switzerland CHE No
Syria SYR No
Taiwan TWN No
Tajikistan TJK No
Tanzania TZA No
Thailand THA No
Timor-Leste TLS No
Togo TGO No
Tonga TON No
Trans-Africa Highway Network TAH† No
Trinidad and Tobago TTO No
Tunisia TUN No
Turkey TUR No
Turkmenistan TKM No
Tuvalu TUV No
Uganda UGA No
Ukraine UKR No
United Arab Emirates ARE No
United Kingdom GBR No
United States USA Yes
Uruguay URY No
Uzbekistan UZB No
Venezuela VEN No
Vietnam VNM No
Wales WLS No
Yemen YEM No
Yugoslavia YUG No
Zambia ZMB No
Zimbabwe ZWE No

Setup instructions[edit]

No setup is necessary for the above countries so long as all of the links are blue. If the country you're looking for isn't listed, the templates that need to be set up are listed below. <country ISO code> is the country's ISO 3166-1 alpha-3 code. If you are uncomfortable with setting up these templates yourself, feel free to post on Template talk:Infobox road, and another editor will do it for you.

Template What it does Example
[[Template:Infobox road/name/<country ISO code>]] Specifies the name that should be shown at the top of the infobox, below the shield but above everything else. Template:Infobox road/name/USA
[[Template:Infobox road/shieldmain/<country ISO code>]] Specifies the shield that should be shown at the top of the infobox. Template:Infobox road/shieldmain/USA
[[Template:Infobox road/shield/<country ISO code>]] Specifies the shield that should be shown in the browse row. Template:Infobox road/shield/USA
Template:Infobox road/styles.css Specifies the header colors in the infobox.
Module:Infobox road/browselinks Specifies the links that should be shown at the bottom of the infobox, above the browse row but below everything else.

To set up a basic road data module for an example country where the ISO 3166-1 alpha-3 code is AAA, copy and paste the following code into Module:Road data/strings/AAA:

--[==[
To inspect the content of this data module, use [[Special:ExpandTemplates]]
and enter the following input text:
  {{#invoke:Road data/dump|dump|module=Module:<name-of-this-module>}}

To inspect the content of this data module when editing, enter the following
into the Debug console:
  local util = require("Module:Road data/util")
  print(util.arrayToString(p))
To inspect a particular route type, change `p` above to include the route type,
e.g., `p.I` and `p["US-Hist"]`.
]==]

-- <name of country>
local AAA = {}

local util = require("Module:Road data/util")

AAA.type = {
    shield = "",
    name = "",
    link = "",
    abbr = "",
    translation = "",
    lang = ""
	
}

return AAA

The comment at the top gives instructions on how to use the debug console while editing the data module.

For each route type, set up a table with the following fields:

  • shield - the route marker or number plate that denotes the route; do not include the File: namespace prefix
  • name - the official name of the route
  • link - the title of the pages
  • abbr - an abbreviation of the name of the route
  • translation - if the country is in a non-English-speaking area, the official name of the route in the native language
  • lang - the ISO 639-2 code of the native language; this code is used by {{Lang}} and {{Lang-xx}}.

Read Module:Road data/strings/doc for more instructions on filling out the road data string modules