Ok, I know there are plenty of automatic translation tools out there. I know there are tools to have the user specific which language they want.

But what I'm really looking for is a way for the site to automatically detect which language to use based off of location, and then let them switch it if they want.

For instance, I have a website, to which I have an english copy and a human-translated spanish copy. If an english user comes to the site, I want the site to automatically switch to my english copy, and vice versa for the spanish copy.

So is there a script or something out there that can detect which language the site should be in before the page even loads?