Command line¶
google_translate module comes with a command line script for Linux.
Usage¶
google-translate [mode] [options] word(s)
Options¶
Run google-translate –help to see a list with available options.
Examples¶
Translate single word:
google-translate -d el "hello world"Translate multiple words:
google-translate -d el car dog cat sunGet additional translations in json format:
google-translate --additional -d el -o json houseDetect source language:
google-translate -m detect carUse a proxy:
google-translate -d russian --proxy "127.0.0.1:8080" helloAdd extra HTTP headers:
google-translate -d russian hello --header "User-Agent:yolo" --header "Message:from russia with love"Translate file:
google-translate -d greek file://myfile.txt
Note
Currently the google-translate script supports only one file.