Re: [PHP] human language detection?

2003-01-26 Thread Davy Obdam
Hi Marco.

Try the HTTP_USER_ACCEPT_LANGUAGE variable. It simply detects the 
language of the visitors browser. It wouldnt work for my cause i use an 
english version of Mozilla (i am dutch too),  although 90% of the dutch 
visitors probably uses MSIE in dutch eh;-)

Best regards,

Davy Obdam

Marco Bleeker wrote:

Hi, I am creating a bilingual website (Dutch and English) and I wonder 
how I would best detect the human language of a visitor. I am 
attempting several things, but I am sure there must be a generally 
accepted alternative. Can anyone point me to more info?

I am tinkering around with HTTP_REFERER and HTTP_USER_AGENT and a bit 
in JavaScript which only works with Netscape browsers. But detection 
usually fails. I was wondering, my server provides a REMOTE_ADDR 
value, but not a REMOTE_HOST. From the last I could look voor a ".nl" 
extention. Is there a way to (inline) translate a IP address to 
something readable? It's a remote server on which I can't control the 
settings.

Why is this so  difficult? It should be a basic feature of any 
international software... or am I missing something?

Thanks, Marco
--
Marco Bleeker, Amsterdam, NL.
Please do not distribute my email address to a third party
Refer to www.ecocam.com for an email form (and more)



--

Davy Obdam - Obdam webdesign©
mailto:[EMAIL PROTECTED]   web: www.davyobdam.com





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




[PHP] human language detection?

2003-01-26 Thread Marco Bleeker
Hi, I am creating a bilingual website (Dutch and English) and I wonder how 
I would best detect the human language of a visitor. I am attempting 
several things, but I am sure there must be a generally accepted 
alternative. Can anyone point me to more info?

I am tinkering around with HTTP_REFERER and HTTP_USER_AGENT and a bit in 
JavaScript which only works with Netscape browsers. But detection usually 
fails. I was wondering, my server provides a REMOTE_ADDR value, but not a 
REMOTE_HOST. From the last I could look voor a ".nl" extention. Is there a 
way to (inline) translate a IP address to something readable? It's a remote 
server on which I can't control the settings.

Why is this so  difficult? It should be a basic feature of any 
international software... or am I missing something?

Thanks, Marco
--
Marco Bleeker, Amsterdam, NL.
Please do not distribute my email address to a third party
Refer to www.ecocam.com for an email form (and more)


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



[PHP] human language detection

2003-01-26 Thread Marco Bleeker
Hi, I am creating a bilingual website (Dutch and English) and I wonder how 
I would best detect the human language of a visitor. I am attempting 
several things, but I am sure there must be a generally accepted 
alternative. Can anyone point me to more info?

I am tinkering around with HTTP_REFERER and HTTP_USER_AGENT and a bit in 
JavaScript which only works with Netscape browsers. But detection usually 
fails. I was wondering, my server provides a REMOTE_ADDR value, but not a 
REMOTE_HOST. From the last I could look voor a ".nl" extention. Is there a 
way to (inline) translate a IP address to something readable? It's a remote 
server on which I can't control the settings.

Why is this so  difficult? It should be a basic feature of any 
international software... or am I missing something?

Thanks, Marco
--
Marco Bleeker, Amsterdam, NL.
Please do not distribute my email address to a third party
Refer to www.ecocam.com for an email form (and more)


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



Re: [PHP] human language detection

2003-01-26 Thread Jason Wong
On Monday 27 January 2003 01:39, Marco Bleeker wrote:
> Hi, I am creating a bilingual website (Dutch and English) and I wonder how
> I would best detect the human language of a visitor. I am attempting
> several things, but I am sure there must be a generally accepted
> alternative. Can anyone point me to more info?

The most practical way to do this is to default to one language (that of your 
majority target audience) then let the user choose if they want to select a 
different one, and keep their selection in a session or cookie.

Trying to second-guess a user's preference from their browser settings/IP 
address/whatever is IMHO a waste of time.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Men use thought only to justify their wrong doings, and speech only to
conceal their thoughts.
-- Voltaire
*/


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




[PHP] human language detection

2003-01-26 Thread Marco Bleeker
Hi, I am creating a bilingual website (Dutch and English) and I wonder how 
I would best detect the human language of a visitor. I am attempting 
several things, but I am sure there must be a generally accepted 
alternative. Can anyone point me to more info?

I am tinkering around with HTTP_REFERER and HTTP_USER_AGENT and a bit in 
JavaScript which only works with Netscape browsers. But detection usually 
fails. I was wondering, my server provides a REMOTE_ADDR value, but not a 
REMOTE_HOST. From the last I could look voor a ".nl" extention. Is there a 
way to (inline) translate a IP address to something readable? It's a remote 
server on which I can't control the settings.

Why is this so  difficult? It should be a basic feature of any 
international software... or am I missing something?

Thanks, Marco

--
Marco Bleeker, Amsterdam, NL.
Please do not distribute my email address to a third party
Refer to www.ecocam.com for an email form (and more)


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