How could i do a website so that if a visitior comes from the uk they get an english language version of the webiste, but of they come from Russia they get a Russian version of the website?
Is it possible to redirect by ip address? Or are there better ways of doing this? If anyone knows of some good resource for this stuff cheers
You shouldn’t redirect users depending on where they are surfing from. If I visit Greece and use my computer from there, I don’t want websites to change into Greek since I don’t understand Greek. Besides, where would you redirect someone from Switzerland with 4 official languages?
Instead, you should examine the Accept-Language
HTTP header sent by the user’s browser, and redirect based on that. (Taking into account the Q values, or quality values, of course.)
You can do that with a server-side scripting/programming language. HTTP servers like Apache can even do it automatically for you, if you enable that option and name your files in a special way (e.g., index.html.en
, index.html.ru
, etc.).