I need to create a website that automatically detect visitor's country so that the language will appear as visitor's language.
I need to create a website that automatically detect visitor's country so that the language will appear as visitor's language.
webwiz posted this at 17:40 — 17th May 2008.
He has: 356 posts
Joined: May 2007
No need to detect the country, Anton. Besides, what language do you serve to a Canadian or someone in Luxembourg?
Browsers include an "Accept-Language" field in the response header that tells you the language that the visitor prefers. That's how search engines know not to give you a bunch of references written in Japanese, unless your browser says so.
How you do this depends on what server-side script language you are using. Google "accept-language http header " + "PHP" or whatever.
Cordially, David
--
"Old web developers don't die, they degrade gracefully..."
anton2520 posted this at 04:29 — 3rd June 2008.
They have: 8 posts
Joined: May 2008
can you give me an example? Or the link to refer this problem.
webwiz posted this at 19:26 — 6th June 2008.
He has: 356 posts
Joined: May 2007
This link may help: Multilingual Websites with ... Content Negotiation.