Automatically switch language

Inspired by http://type-y.com/2011/04/post-407.html

Change-Id: Ifc370b8b28d879bb6397b033d56d5916a9d366f6