Bước tới nội dung

Bản mẫu:Infobox road/doc/country

Bách khoa toàn thư mở Wikipedia

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

Supported countries

[sửa mã nguồn]

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

Setup instructions

[sửa mã nguồn]

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