---
title: "Landskoder?"
type: "forum-thread"
url: "https://www.webforum.nu/amne/php/41422-landskoder"
topic: "PHP"
topic_url: "https://www.webforum.nu/amne/php"
author: "UrMe"
published: "2002-04-12T07:08:36.000Z"
updated: "2002-04-14T13:39:32.000Z"
replies: 7
views: 786
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/php/41422-landskoder"
---

# Landskoder?

## #1 — UrMe, 2002-04-12T07:08Z

Detta som man får ut ur $HTTP_ACCEPT_LANGUAGE ... kan man se nånstans vart alla förkortningar står för?
menar det finns ju en-us inte så svårt.. men en,pdf får jag också fram och da (danmark kanske) etc etc ... 
nån som vet?

Permalänk: https://www.webforum.nu/p/41422

## #2 — Fredde Mannen, 2002-04-12T08:45Z

Landskoder på Internet!

Hänvisar till mitt senare inlägg!  :birp

Permalänk: https://www.webforum.nu/p/641773

## #3 — UrMe, 2002-04-12T08:50Z

Jo.. det där är ju för toppdomänerna... men alltså det är inte samma som man får ut av $HTTP_ACCEPT_LANGUAGE .. utan om man har en svensk webläsare så får man ut ett "sv" engelsk "en"... så det stämmer ju inte riktigt ..

Permalänk: https://www.webforum.nu/p/641774

## #4 — Web-Tor, 2002-04-12T08:59Z

sorry... :r

Permalänk: https://www.webforum.nu/p/641779

## #5 — Fredde Mannen, 2002-04-12T09:18Z

Du har rätt! :-)

Här har du svaret du söker efter!

Med tanke på att HTTP_ACCEPT_LANGUAGE håller värdet som talar om vilket språk som användarens dator har i form av en förkortning. 

Men ialla fall de flesta Svenska datorer som variabeln hämtar ett värde från får alltså sv som värde. 

Så är det nog dessa du söker efter! :-)

Bulgariska BG 
Danska DA 
Danska DA 
Engelska EN 
Esperanto EO 
Finska FI 
Franska FR 
Grekiska EL 
Grönländska KL 
Hebreiska HE 
Holländska NL 
Isländska IS 
Italienska IT 
Japanska JA 
Katalanska CA 
Koreanska KO 
Kroatiska HR 
Latin LA 
Lettiska ET 
Litauiska LT 
Maltesiska MT 
Norska NO 
Polska PL 
Portugisiska PT 
Rumänska RO 
Ryska RU 
Spanska ES 
Svenska SV 
Swahili SW 
Tjeckiska CS 
Tyska DE 
Ungerska HU 
Walesiska CY 

 :birp

Permalänk: https://www.webforum.nu/p/641791

## #6 — UrMe, 2002-04-12T09:23Z

Ah... king... tackar!

Permalänk: https://www.webforum.nu/p/641797

## #7 — spango, 2002-04-13T11:55Z

Re: Du har rätt! :-)

> *Ursprungligen av Fredde Mannen*  **Med tanke på att HTTP_ACCEPT_LANGUAGE håller värdet som talar om vilket språk som användarens dator har i form av en förkortning.**

Om man ska vara petig ( :D ) så är det naturligtvis webbläsarens inställningar, inte datorn. Men vad jag egentligen tänkte säga, var att en komplett lista finns [här](http://www.w3.org/WAI/ER/IG/ert/iso639.htm) (hata ISO som inte kan lägga ut sina egna standarder på nätet x( ).

Dessutom kan exempelvis amerikanska markeras som en_US, finlandssvenska som sv_FI och så vidare. Kolla alltså bara på de två första tecknen.

Permalänk: https://www.webforum.nu/p/642463

## #8 — Niklasson, 2002-04-14T13:39Z

Kanske kan vara till hjälp

```php
<?
$country = array();

$country[ac] = "Ascension Island";
$country[ad] = "Andorra";
$country[ae] = "United Arab Emirates";
$country[af] = "Afghanistan";
$country[ag] = "Antigua and Barbuda";
$country[ai] = "Anguilla";
$country[al] = "Albania";
$country[am] = "Armenia";
$country[an] = "Netherlands Antilles";
$country[ao] = "Angola";
$country[aq] = "Antartica";
$country[ar] = "Argentina";
$country[as] = "American Samoa";
$country[au] = "Australia";
$country[aw] = "Aruba";
$country[az] = "Azerbaijan";
$country[ba] = "Bosnia and Herzegovina";
$country[bb] = "Barbados";
$country[bd] = "Bangladesh";
$country[be] = "Belgium";
$country[bf] = "Burkina Faso";
$country[bg] = "Bulgaria";
$country[bh] = "Bahrain";
$country[bi] = "Burundi";
$country[bj] = "Benin";
$country[bm] = "Bermuda";
$country[bn] = "Brunei Darussalam";
$country[bo] = "Bolivia";
$country[br] = "Brazil";
$country[bs] = "Bahamas";
$country[bt] = "Bhutan";
$country[bv] = "Bouvet Island";
$country[bw] = "Botswana";
$country[by] = "Belarus";
$country[bz] = "Belize";
$country[ca] = "Canada";
$country[cc] = "Cocos (Keeling) Islands";
$country[cd] = "Congo, Democratic People's Republic";
$country[cf] = "Central African Republic";
$country[cg] = "Congo, Republic of";
$country[ch] = "Switzerland";
$country[ci] = "Cote d'Ivoire";
$country[ck] = "Cook Islands";
$country[cl] = "Chile";
$country[cm] = "Cameroon";
$country[cn] = "China";
$country[co] = "Colombia";
$country[cr] = "Costa Rica";
$country[cu] = "Cuba";
$country[cv] = "Cap Verde";
$country[cx] = "Christmas Island";
$country[cy] = "Cyprus";
$country[cz] = "Czeck Republic";
$country[de] = "Germany";
$country[dj] = "Djibouti";
$country[dk] = "Denmark";
$country[dm] = "Dominica";
$country[do] = "Dominican Republic";
$country[dz] = "Algeria";
$country[ec] = "Ecuador";
$country[ee] = "Estonia";
$country[eg] = "Egypt";
$country[eh] = "Western Sahara";
$country[er] = "Eritrea";
$country[es] = "Spain";
$country[et] = "Ethiopia";
$country[fi] = "Finland";
$country[fj] = "Fiji";
$country[fk] = "Falkland Islands (Malvina)";
$country[fm] = "Micronesia, Federal State of";
$country[fo] = "Faroe Islands";
$country[fr] = "France";
$country[ga] = "Gabon";
$country[gd] = "Grenada";
$country[ge] = "Georgia";
$country[gf] = "French Guiana";
$country[gg] = "Guernsey";
$country[gh] = "Ghana";
$country[gi] = "Gibraltar";
$country[gl] = "Greenland";
$country[gm] = "Gambia";
$country[gn] = "Guinea";
$country[gp] = "Guadeloupe";
$country[gq] = "Equatorial Guinea";
$country[gr] = "Greece";
$country[gs] = "South Georgia and the South Sandwich Islands";
$country[gt] = "Guatemala";
$country[gu] = "Guam";
$country[gw] = "Guinea-Bissau";
$country[gy] = "Guyana";
$country[hk] = "Hong Kong";
$country[hm] = "Heard and McDonald Islands";
$country[hn] = "Honduras";
$country[hr] = "Croatia/Hrvatska";
$country[ht] = "Haiti";
$country[hu] = "Hungary";
$country[id] = "Indonesia";
$country[ie] = "Ireland";
$country[il] = "Israel";
$country[im] = "Isle of Man";
$country[in] = "India";
$country[io] = "British Indian Ocean Territory";
$country[iq] = "Iraq";
$country[ir] = "Iran (Islamic Republic of)";
$country[is] = "Iceland";
$country[it] = "Italy";
$country[je] = "Jersey";
$country[jm] = "Jamaica";
$country[jo] = "Jordan";
$country[jp] = "Japan";
$country[ke] = "Kenya";
$country[kg] = "Kyrgyzstan";
$country[kh] = "Cambodia";
$country[ki] = "Kiribati";
$country[km] = "Comoros";
$country[kn] = "Saint Kitts and Nevis";
$country[kp] = "Korea, Democratic People's Republic";
$country[kr] = "Korea, Republic of";
$country[kw] = "Kuwait";
$country[ky] = "Cayman Islands";
$country[kz] = "Kazakhstan";
$country[la] = "Lao, People's Democratic Republic";
$country[lb] = "Lebanon";
$country[lc] = "Saint Lucia";
$country[li] = "Liechtenstein";
$country[lk] = "Sri Lanka";
$country[lr] = "Liberia";
$country[ls] = "Lesotho";
$country[lt] = "Lithuania";
$country[lu] = "Luxembourg";
$country[lv] = "Latvia";
$country[ly] = "Libyan Arab Jamahiriya";
$country[ma] = "Morocco";
$country[mc] = "Monaco";
$country[md] = "Moldova, Republic of";
$country[mg] = "Madagascar";
$country[mh] = "Marshall Islands";
$country[mk] = "Macedonia, Former Yugoslav Republic";
$country[ml] = "Mali";
$country[mm] = "Myanmar";
$country[mn] = "Mongolia";
$country[mo] = "Macau";
$country[mp] = "Northern Mariana Islands";
$country[mq] = "Martinique";
$country[mr] = "Mauritania";
$country[ms] = "Montserrat";
$country[mt] = "Malta";
$country[mu] = "Mauritius";
$country[mv] = "Maldives";
$country[mw] = "Malawi";
$country[mx] = "Mexico";
$country[my] = "Malaysia";
$country[mz] = "Mozambique";
$country[na] = "Namibia";
$country[nc] = "New Caledonia";
$country[ne] = "Niger";
$country[nf] = "Norfolk Island";
$country[ng] = "Nigeria";
$country[ni] = "Nicaragua";
$country[nl] = "Netherlands";
$country[no] = "Norway";
$country[none] = "Unknown location";
$country[np] = "Nepal";
$country[nr] = "Nauru";
$country[nu] = "Niue";
$country[nz] = "New Zealand";
$country[om] = "Oman";
$country[pa] = "Panama";
$country[pe] = "Peru";
$country[pf] = "French Polynesia";
$country[pg] = "Papua New Guinea";
$country[ph] = "Philippines";
$country[pk] = "Pakistan";
$country[pl] = "Poland";
$country[pm] = "St. Pierre and Miquelon";
$country[pn] = "Pitcairn Island";
$country[pr] = "Puerto Rico";
$country[pt] = "Portugal";
$country[pw] = "Palau";
$country[py] = "Paraguay";
$country[qa] = "Qatar";
$country[re] = "Reunion Island";
$country[ro] = "Romania";
$country[ru] = "Russian Federation";
$country[rw] = "Rwanda";
$country[sa] = "Saudi Arabia";
$country[sb] = "Solomon Islands";
$country[sc] = "Seychelles";
$country[sd] = "Sudan";
$country[se] = "Sweden";
$country[sg] = "Singapore";
$country[sh] = "St. Helena";
$country[si] = "Slovenia";
$country[sj] = "Svalbard and Jan Mayen Islands";
$country[sk] = "Slovak Republic";
$country[sl] = "Sierra Leone";
$country[sm] = "San Marino";
$country[sn] = "Senegal";
$country[so] = "Somalia";
$country[sr] = "Suriname";
$country[st] = "Sao Tome and Principe";
$country[sv] = "El Salvador";
$country[sy] = "Syrian Arab Republic";
$country[sz] = "Swaziland";
$country[tc] = "Turks and Ciacos Islands";
$country[td] = "Chad";
$country[tf] = "French Southern Territories";
$country[tg] = "Togo";
$country[th] = "Thailand";
$country[tj] = "Tajikistan";
$country[tk] = "Tokelau";
$country[tm] = "Turkmenistan";
$country[tn] = "Tunisia";
$country[to] = "Tonga";
$country[tp] = "East Timor";
$country[tr] = "Turkey";
$country[tt] = "Trinidad and Tobago";
$country[tv] = "Tuvalu";
$country[tw] = "Taiwan";
$country[tz] = "Tanzania";
$country[ua] = "Ukraine";
$country[ug] = "Uganda";
$country[uk] = "United Kingdom";
$country[gb] = "United Kingdom";
$country[um] = "US Minor Outlying Islands";
$country[us] = "United States";
$country[uy] = "Uruguay";
$country[uz] = "Uzbekistan";
$country[va] = "Holy See (City Vatican State)";
$country[vc] = "Saint Vincent and the Grenadines";
$country[ve] = "Venezuela";
$country[vg] = "Virgin Islands (British)";
$country[vi] = "Virgin Islands (USA)";
$country[vn] = "Vietnam";
$country[vu] = "Vanuatu";
$country[wf] = "Wallis and Futuna Islands";
$country[ws] = "Western Samoa";
$country[ye] = "Yemen";
$country[yt] = "Mayotte";
$country[yu] = "Yugoslavia";
$country[za] = "South Africa";
$country[zm] = "Zambia";
$country[zr] = "Zaire";
$country[zw] = "Zimbabwe";
$country[com] = "US Commercial";
$country[net] = "Network";
$country[org] = "US Orginasation";
$country[edu] = "US Education";
$country[int] = "International";
$country[arpa] = "Old ARPA Network";
$country[at] = "Austria";
$country[gov] = "Governement";
$country[mil] = "Miltary";
$country[su] = "Ex U.S.R.R.";
$country[reverse] = "Is deprecated";
?>
```

Permalänk: https://www.webforum.nu/p/645804

---

Tråden på webben: https://www.webforum.nu/amne/php/41422-landskoder
