Page 1 of 1

How about ISO-3166-2?

Posted: Sun Dec 17, 2006 2:47 pm
by visonardo
How about ISO-3166-2 ?

Im from argentina and for example i found http://en.wikipedia.org/wiki/ISO_3166-2:AR

but, really the users agent give this info? , because my explorer (mozilla) just give es-ar

this is the header that gives my explorer

Code: Select all

[Accept-Language] => es-ar,es;q=0.8,en-us;q=0.5,en;q=0.3

then, how can i use those codes? to determinate exactly where are they come from :?

Posted: Sun Dec 17, 2006 2:52 pm
by feyd
You can't use it to determine where they are from. What you can do with that information is understand what language their browser natively is built for and deduce from that what language(s) the visitor understands. In this case, Argentinian Spanish.

Posted: Sun Dec 17, 2006 3:29 pm
by visonardo
ok, but for example to Argentina´s salta province the code say that is AR-A. when/where or for what i must use this code? or ist useful? :?:

Re: How about ISO-3166-2?

Posted: Sun Dec 17, 2006 6:12 pm
by volka
visonardo wrote:but, really the users agent give this info? , because my explorer (mozilla) just give es-ar

this is the header that gives my explorer

Code: Select all

[Accept-[b]Language[/b]] => es-ar,es;q=0.8,en-us;q=0.5,en;q=0.3
language codes are defined in ISO 639
ISO 3166 is about localisation, not languages.

Re: How about ISO-3166-2?

Posted: Sun Dec 17, 2006 8:56 pm
by visonardo
volka wrote:
visonardo wrote:but, really the users agent give this info? , because my explorer (mozilla) just give es-ar

this is the header that gives my explorer

Code: Select all

[Accept-[b]Language[/b]] => es-ar,es;q=0.8,en-us;q=0.5,en;q=0.3
language codes are defined in ISO 639
ISO 3166 is about localisation, not languages.

yes, i knew that; But where is it used? some explorer give this data if you configure very good?. Other thing that perhaps is related with it is that in somesites that you check ip address own, showed medirectly that my ip was from Buenos Aires, how they do that? perhaps is something that give the iso3166-2 codes

Posted: Mon Dec 18, 2006 5:04 am
by volka
Never heard of a standard browser/client sending ISO 3166 infos within "normal" http requests.
Maybe you find something useful about the usage at http://www.iso.org/iso/en/prods-service ... 166-2.html
I've never came in "direct" contact with this standard. There are other standards that make use of some parts of iso 3166 but they are standards on their own, add codes, only use a subset etc.
I found http://www.idude.net/I18N/articles/web_ ... o_3166.asp via google
I am simply amazed by the fact that the following options appear in country select boxes on many websites.
* Bouvet Island
* Heard & McDonald islands
Why? Because they are uninhabited.
and now I'm interested ;)

There are databases that try to link ip addresses to regions. Results might be accurate, might be wrong ;)
I only know of geoip but there are certainly other services of this kind.

Posted: Mon Dec 18, 2006 11:50 am
by visonardo
wow 8O

Cool info, Thank you so much by that :o

:D

Posted: Mon Dec 18, 2006 1:17 pm
by duk
nice post GeoIP is great :D