simple translate using Google translate

This commit is contained in:
Alexandre Dulaunoy 2011-04-18 22:31:14 +02:00
parent 710ad77ae0
commit 7bf6347b1b

8
bin/translate Executable file
View file

@ -0,0 +1,8 @@
#!/bin/sh
#
# translate using google Translate services
#
# Usage:
# translate "la vie des chicons" fr en
wget -qO- "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=$1&langpair=$2|${3:-en}" | sed 's/.*"translatedText":"\([^"]*\)".*}/\1\n/';