Just to support what some of the other respondents have already said -- please don't do this. My native language is English, but I live in a German-speaking country, and it is infuriating when a website guesses (incorrectly) on the basis of my IP address that I would prefer information in German. If you try to guess, and you get it wrong, you will a) annoy people and b) possibly lose customers. Always let your visitors make their own choices.
Update: There's a short but useful article from AG Consult on the subject.