En HTML, los códigos de país pueden ser usados para adicionar el código de idioma, establecido en el atributo lang
. Los primeros dos caracteres de un código de idioma define el idioma de la página web y los últimos dos caracteres definen el país. Estos 2 códigos se deben separar textualmente por un guion medio "-".
Esta es la forma de definir un dialecto de idioma, es decir, un idioma específico de un país. Por nombrar unos ejemplos: para el ingles de Estados Unidos de América se define como "en-US"
, para el ingles del Reino Unido se define como "en-GB"
Para conocer más acerca de los códigos de idioma puedes ir a: Valores de Idioma.
Un ejemplo de como definir el idioma ingles de Estados Unidos de América a una página web, sería de la siguiente manera:
<html lang="en-US"> ... </html>
Lista de Valores
Listado de valores
Código | Nombre |
---|---|
|
ANDORRA |
|
UNITED ARAB EMIRATES |
|
AFGHANISTAN |
|
ANTIGUA AND BARBUDA |
|
ALBANIA |
|
ANGOLA |
|
ANTARCTICA |
|
ARMENIA |
|
NETHERLANDS ANTILLES |
|
ARGENTINA |
|
AMERICAN SAMOA |
|
AUSTRIA |
|
AUSTRALIA |
|
ARUBA |
|
AZERBAIJAN |
|
BOSNIA AND HERZEGOVINA |
|
BARBADOS |
|
BANGLADESH |
|
BELGIUM |
|
BURKINA FASO |
|
BULGARIA |
|
BAHRAIN |
|
BURUNDI |
|
BENIN |
|
BERMUDA |
|
BRUNEI DARUSSALAM |
|
BOLIVIA |
|
BRAZIL |
|
BAHAMAS |
|
BHUTAN |
|
BOUVET ISLAND |
|
BOTSWANA |
|
BELARUS |
|
BELIZE |
|
CANADA |
|
COCOS (KEELING) ISLANDS |
|
CONGO, THE DEMOCRATIC REPUBLIC OF THE |
|
CENTRAL AFRICAN REPUBLIC |
|
CONGO |
|
SWITZERLAND |
|
CÔTE D'IVOIRE |
|
COOK ISLANDS |
|
CHILE |
|
CAMEROON |
|
COLOMBIA |
|
CHINA |
|
COSTA RICA |
|
CUBA |
|
CAPE VERDE |
|
CHRISTMAS ISLAND |
|
CYPRUS |
|
CZECH REPUBLIC |
|
GERMANY |
|
DJIBOUTI |
|
DENMARK |
|
DOMINICA |
|
DOMINICAN REPUBLIC |
|
ALGERIA |
|
ECUADOR |
|
ESTONIA |
|
EGYPT |
|
WESTERN SAHARA |
|
ERITREA |
|
ETHIOPIA |
|
FALKLAND ISLANDS (MALVINAS) |
|
FINLAND |
|
FIJI |
|
MICRONESIA, FEDERATED STATES OF |
|
FAROE ISLANDS |
|
FRANCE |
|
GABON |
|
UNITED KINGDOM |
|
GRENADA |
|
GEORGIA |
|
FRENCH GUIANA |
|
GHANA |
|
GIBRALTAR |
|
GREENLAND |
|
GUINEA |
|
GAMBIA |
|
GUADELOUPE |
|
GREECE |
|
SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS |
|
GUAM |
|
GUATEMALA |
|
GUINEA-BISSAU |
|
GUYANA |
|
HONG KONG |
|
HEARD ISLAND AND MCDONALD ISLANDS |
|
HONDURAS |
|
CROATIA |
|
HAITI |
|
HUNGARY |
|
INDONESIA |
|
IRELAND |
|
ISRAEL |
|
INDIA |
|
BRITISH INDIAN OCEAN TERRITORY |
|
IRAQ |
|
IRAN, ISLAMIC REPUBLIC OF |
|
ICELAND |
|
ITALY |
|
JAMAICA |
|
JORDAN |
|
JAPAN |
|
KENYA |
|
KYRGYZSTAN |
|
CAMBODIA |
|
KIRIBATI |
|
COMOROS |
|
SAINT KITTS AND NEVIS |
|
KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF |
|
KOREA, REPUBLIC OF |
|
KUWAIT |
|
CAYMAN ISLANDS |
|
KAZAKHSTAN |
|
LAO PEOPLE'S DEMOCRATIC REPUBLIC (LAOS) |
|
SAINT LUCIA |
|
LEBANON |
|
LIECHTENSTEIN |
|
SRI LANKA |
|
LIBERIA |
|
LESOTHO |
|
LITHUANIA |
|
LUXEMBOURG |
|
LATVIA |
|
LIBYA, STATE OF |
|
MOROCCO |
|
MONACO |
|
MOLDOVA, REPUBLIC OF |
|
MONTENEGRO |
|
MADAGASCAR |
|
MARSHALL ISLANDS |
|
MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF |
|
MALI |
|
MYANMAR |
|
MONGOLIA |
|
MACAO |
|
MARTINIQUE |
|
MAURITANIA |
|
MALTA |
|
MAURITIUS |
|
MALDIVES |
|
MALAWI |
|
MALAYSIA |
|
MEXICO |
|
MONTSERRAT |
|
MOZAMBIQUE |
|
NAMIBIA |
|
NEW CALEDONIA |
|
NIGER |
|
NORFOLK ISLAND |
|
NIGERIA |
|
NICARAGUA |
|
NETHERLANDS |
|
NORTHERN MARIANA ISLANDS |
|
NORWAY |
|
NEPAL, FEDERAL DEMOCRATIC REPUBLIC OF |
|
NAURU |
|
NIUE |
|
NEW ZEALAND |
|
OMAN |
|
PANAMA |
|
PERU |
|
FRENCH POLYNESIA |
|
PAPUA NEW GUINEA |
|
PHILIPPINES |
|
PAKISTAN |
|
SAINT PIERRE AND MIQUELON |
|
PITCAIRN |
|
POLAND |
|
PUERTO RICO |
|
PALESTINE, STATE OF |
|
PORTUGAL |
|
PARAGUAY |
|
PALAU |
|
QATAR |
|
EQUATORIAL GUINEA |
|
RÉUNION |
|
ROMANIA |
|
SERBIA |
|
RUSSIAN FEDERATION |
|
RWANDA |
|
SAUDI ARABIA |
|
SOLOMON ISLANDS |
|
SEYCHELLES |
|
SUDAN |
|
SWEDEN |
|
SINGAPORE |
|
SAINT HELENA |
|
SLOVENIA |
|
SVALBARD AND JAN MAYEN |
|
SLOVAKIA |
|
SIERRA LEONE |
|
SAN MARINO |
|
SENEGAL |
|
SOMALIA |
|
SURINAME |
|
SOUTH SUDAN |
|
SAO TOME AND PRINCIPE |
|
SYRIAN ARAB REPUBLIC |
|
EL SALVADOR |
|
SWAZILAND |
|
TURKS AND CAICOS ISLANDS |
|
CHAD |
|
FRENCH SOUTHERN TERRITORIES |
|
TOGO |
|
THAILAND |
|
TAJIKISTAN |
|
TOKELAU |
|
TIMOR-LESTE |
|
TURKMENISTAN |
|
TUNISIA |
|
TONGA |
|
TURKEY |
|
TRINIDAD AND TOBAGO |
|
TAIWAN |
|
TUVALU |
|
TANZANIA, UNITED REPUBLIC OF |
|
UKRAINE |
|
UGANDA |
|
UNITED STATES MINOR OUTLYING ISLANDS |
|
UNITED STATES |
|
URUGUAY |
|
UZBEKISTAN |
|
SAINT VINCENT AND THE GRENADINES |
|
VENEZUELA |
|
VIRGIN ISLANDS, BRITISH |
|
VIRGIN ISLANDS, U.S. |
|
VIET NAM |
|
VANUATU |
|
WALLIS AND FUTUNA |
|
SAMOA |
|
YEMEN |
|
MAYOTTE |
|
SOUTH AFRICA |
|
ZAMBIA |
|
ZIMBABWE |