This is an extremely simple shell script that opens a new google translator tab in the default web browser showing the translation for the current selected text (in any program). You can then link the command to a keyboard shortcut of your choice.
The idea came from notitrans.
This script requires x-sel, which can be installed via apt-get.
To use it, simply paste the script into /usr/local/bin/ folder.