Ever wonder how Google Chrome knows the language of a web page and offers to translate it when the page is written in a foreign language? Or how Facebook offers to translate your friends’ posts in a foreign language? Detecting languages is surprisingly easy, and it can be used to improve user interfaces without having the user do any work. I stumbled across this ActiveState recipe for a language d