Linux - Translate a phrase using google translator, Script to translate a paragraph


Translate a phrase using google translator


translate() { curl -s "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=$1&langpair=$2%7C$3" | sed 's/.*"translatedText":"\([^"]*\)".*}/\1\n/'; }


Usage:
translate <phrase> <source-language> <output-language>

Example:
translate hello en es 

This script is very much helpful when you are about to translate a para or phrase.

Linux - Script to translate a paragraph
The topic on Linux - Translate a phrase using google translator is posted by - Math
Hope you have enjoyed, Linux - Translate a phrase using google translator . Thanks for your time.

All rights reserved. © www.w3calculator.com