When it come to automatic language selection I d go the mod_rewrite route if you re using Apache. It s easier to change in a production environment that touching application code. mod_rewrite grabs the "Accept-Language" out of the header then applies the rewrite rule.
RewriteCond %{HTTP:Accept-Language} ^fr [NC]
RewriteRule ^$ /fr/ [L,R=301]
You can stack the rewrite conditions and rules to work as a catch all language variations (fr, fr-ca, fr-fr, fr-mo, fr-ch all go to fr)
Checkout the official mod-rewrite documentation
good language example:
http://tech-blog.borychowski.com/index.php/2009/03/htaccess/redirect-according-to-browser-language-mod-rewrite-and-http_accept_language/
Once you push the user to the right general language (when none is defined in the URL) the application can set a session language, write links with the set lang. It s also good to allow people to change language on the fly since most users in bilingual locals (i.e. Quebec) work in more than one language. I ve worked with French speaking programmers who prefer reading technical documents in English.
When it comes to Google translating text I d be careful. If you re doing any e-commerce transaction your international customers (or local customers with international browser settings) may get incorrect or inaccurate product information, descriptions and "terms and conditions". If you don t save the exact Google translation text to your DB for every on the fly translation there is no way to track what the user has committed to in their language. Some non-translated legal copy may be in order.
I hope this helps.