Re: human language detection?
| From: | Davy Obdam | Date: | Mon, 27 Jan 2003 00:07:14 +0000 |
| Subject: | Re: human language detection? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-133209@lists.php.net to get a copy of this message | ||
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:info@davyobdam.com web: www.davyobdam.com --------------------------------------------------------------------