--- Filip de Waard <[EMAIL PROTECTED]> wrote:
> I posted the HTTP header that my own browser is using to identify 
> it's language as an example to prove that Accept-Language isn't the 
> right source to identify the visitors language or even his home 
> country.

It's definitely not the way to determine a user's country. It's not called
Country, after all. It's simply a header that indeicates the user's
language preferences (many preferences can be specified, each qith a
different quality value).

However, it is the best way to choose a default language, although giving
the user the option to change language is always a good idea.

Why? Because, I might be working in Germany for a few months, but my
computer is set to English (because I don't speak German). I certainly
don't want you giving me a page in German (which is also available in
English) when I am telling you that I prefer English. This is what
Accept-Language is for, so I hate to hear that people knowingly ignore it.
The user knows best when it comes to what language he/she prefers. Trying
to override this preference with something you determine by IP address is
wildly inaccurate and certain to have a high failure rate.

> I don't have any experience with GeoIP Country from Maxmind (I'm using 
> ip-to-country), but will try it out soon. Thank you for the tip!

No problem. I've tried several, and that one is my favorite. I currently
maintain some Web sites with a very broad audience in terms of countries
around the world, and this is the database that produces the fewest dead
spots for us. Plus, the PHP API was written by a guy from the PHP Group,
so that made me feel even more confident. :-)

Chris

=====
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
     Coming mid-2004
HTTP Developer's Handbook - Sams
     http://httphandbook.org/
PHP Community Site
     http://phpcommunity.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to