Translating text from the command line
Google provides an online translation service you can access via your browser. Andrei Neculau created an awk script that will access that service and do translations from the command line.
Getting ready
The command line translator is not included on most Linux distributions, but it can be installed directly from Git like this:
cd ~/bin wget git.io/trans chmod 755 ./trans
How to do it...
The trans
application will translate into the language in your locale environment variable by default.
$> trans "J'adore Linux" J'adore Linux I love Linux Translations of J'adore Linux French -> English J'adore Linux I love Linux
You can control the language being translated from and to with an option before the text. The format for the option is as follows:
from:to
To translate from English to French, use the following command:
$> trans en:fr "I love Linux" J'aime Linux
How it works...
The trans
program is about 5,000 lines...