A multi language site (Cookies etc)

Associate
Joined
28 Jun 2005
Posts
997
Location
London
Hi all

I'm intending to have a one page help guide translated. I wanted to get opinions on how hard this would be to implement and whether anyone can recommend any good sources.

I was thinking maybe a lightbox on load with a set of languages and respective flags, when a user clicks on the flag or language it would set a cookie and direct them to /en of the site. The next time the user visits the site it will read the en cookie and send the user there. There will be a drop down on the page to change language if need be.

Is this possible? Can a cookie redirect a user?

Thanks!
 
Using any server side language will allow you to read the data contained in the cookie and you can then do a redirect, or page reload based on the cookie.

Its very basic logic for back-end programming.

I would implement little contry flag icons for the languages. When clicked on, set a cookie with country code and then reload based on that.

If you want to be really clever, you could try and detect the user's regional setting from HTTP header server variables.
 
I'd avoid flag images. Just use the language name. Flags aren't overly clear, some countries have many languages, UK and USA are different flags both English.
 
Thanks for the replies, I don't think I'll use that gelocation or regional setting because they may want a different language. I'll probably use language names and flags.

It's good to know it's possible.

I'll try in PHP and let you guys know!

:)
 
I'm such a geek.. I read the title expecting questions about how to integrate sites written in multiple languages such as Java, PHP and perhaps Ruby.

:o
 
The browser should send an Accept-Language header with a weighted list in order of preference. The webserver should be able to serve the correct version of the page without resorting to server side scripting.
 
Back
Top Bottom