Skip to content
Command-line access to google translate and some other features
Branch: master
Clone or download
Latest commit 066d47e Dec 30, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore gitignore Jun 12, 2018
LICENSE license Mar 17, 2018 f2 Mar 17, 2018 always sould off Jul 28, 2018
translate yandex transcription added Dec 30, 2018 urban sock lib dependency commented May 27, 2017

Gitter chat

Google translate script. It gives you easy access to Google Translate in your terminal:

Installation step by step:

    1. download one of the version Perl ( or Bash (translate and
    1. install requirements
    1. execute command: $ chmod +x translate
    1. add to ~/.bash_aliases: alias t="/home/user/"
    1. (optional) edit options section in script or translate for your taste (choose language detection scema)
$ t die unbekannten Sprache
	Language: German
$ t -l
	de	German
$ alias tde="t -s de -t en"
$ tde "die unbekannten Sprache"
	the unknown language

Google translate shell, Google translate command-line, command-line translator Google Translate, Linux, easy to use, fast and comfortable. Command-line google translate, quick translate, very simple scripts, scripts for assess Google Translate, Google Translate CLI.


  • - Perl5 version. Google translate only.
  • translate - Bash version. Good for English dictionary.
  • - optional plugin for bash version.

Perl version

get perl version:

$ wget
$ chmod +x


  • perl5 >= v5.16
  • perl JSON
  • perl Clone
  • perl LWP::Protocol::socks -if you need socks proxy
  • mplayer or mpg123 -for sound


  • Windows support(planned),
  • translated text,
  • fixed text with highlight,
  • language detection,
  • dictionary,
  • translit,
  • google text-to-speach

There is two systems for detection of direction($FIRST_LANG to $SECOND_LANG or vice versa):

  • Simple detection of direction. First it search Latin or Russian symbols and decide. If not found it use $source = 'auto'; $target = 'en';
  • Advanced detection of direction. ALD=1;

Bash version - extended support for english and german, urban dictionary


  • UTF-8 support for required languages
  • curl >= 7.21.0
  • SpiderMonkey or nodejs
  • mpg123 for playing pronunciation For Debian sid: #apt-get install curl spidermonkey-bin html2text mpg123 For Debian jessie: #apt-get install curl nodejs html2text mpg123 For FreeBSD: #pkg install curl spidermonkey24 html2text mpg123
  • account for pronunciation
  • optional:, perl HTML-Tree (see URBAN_DICTIONARY)


  • translated text,
  • fixed text with highlight,
  • language detection,
  • dictionary,
  • translit,
  • execution without parameters will translate fixed string for 1-2 words
  • prompt mode
  • requery with fixed

for english:

  • phrases, forms, ideom, transcription, audio pronunciation
  • cache for words
  • saving english words to file for learning
  • urban dictionary

for german:

  • transcription

for convenience. Add to ~/.bash_aliases:

  • alias t="/home/user/"
  • alias ts="/home/user/translate -S"


  • -s Source language (can be "auto")
  • -t Target language (can't be)
  • -l List of languages
  • -h Help


  • t -s auto -t en 母亲
  • cat file | t -

Debian Cyrillic support in tty shell:

    1. #dpkg-reconfigure locales
  • Install en_US.utf8, ru_RU.utf8
    1. #dpkg-reconfigure console-setup
  • Install . Combined - latin slavic Cyrillic; Greek

command line google translate command-line translator linux debian gentoo fedora mint ubuntu text-based languages

You can’t perform that action at this time.