Minimal permissions version. This extension creates a context menu item in the browser, when you click on a menu item, the current page url, link or the previously selected text is sent to Google Translate. You can also setup default language in the option page.
First you should change the default language settings by accessing to about:addons > To Google Translate option page.
Select any text in some web page and then right click with your mouse
Go to Google Translate at the bottom of your right click menu. You will see three options. Translate will only translate the selection, Listen lets you hear what the selection sounds like and Translate this page will translate the entire page.
You can also click the toolbar button for a quick Google translation.
If you have not selected any text, the right click menu will show the option to translate the entire page.
You can test the extension in Firefox with web-ext. web-ext can be installed with the Node Package Manager.
sudo npm install --global web-ext
Download the code from Github
git clone https://github.com/mold-resistant/to-google-translate.git
cd to-google-translate
make prepare
Run in the root folder extension the command
web-ext run