mirror of
https://github.com/adulau/dotfiles.git
synced 2024-12-22 08:46:01 +00:00
simple translate using Google translate
This commit is contained in:
parent
710ad77ae0
commit
7bf6347b1b
1 changed files with 8 additions and 0 deletions
8
bin/translate
Executable file
8
bin/translate
Executable 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/';
|
Loading…
Reference in a new issue