Skip to main content

Command line translator pulling from and coded in Python

Project description


Command-line translator relying on [WordReference](
for translation and coded in Python.

After several years of being disappointed with google translate, I discovered
the website [WordReference](, which offers far better
translations for about any word. What I particularly enjoy is the fact that it
tries to translate all the variations in meaning, as words don't necessarily
match perfectly. And it also works fairly well with expressions.

So, since I'm a sucker for everything related to terminals, I came up with this
little tool. Nothing fancy, just good translation at the fingertip


You can install directly this package with pip:
pip install translate-term


You simply need to call it from a terminal with the `translate [dict] [word]`

- The `dict` argument is a 4 letter string, the first two letters being
the key corresponding to the initial language and the last 2 the key to the
language to translate to
- The `word` argument is the word or expression to be translated. If the case
of an expression, remember to put quotes around it.

For example, if you want to translate 'speak' from English to French, you need
to type:
translate enfr speak

And if you want to translate an expression:
translate enfr "speak out"

If you want the list of available dictionaries, just pass the `-l` or `--list`
translate -l
translate --list

Any doute, just call for `--help`!:
translate -h
translate --help


This utility doesn't rely on any API, so there is practically no limit in the
number of translations that you can perform.

There are a few strange characters that appear here and there. They come from
the html, and I'm too lazy to handle them.

Also you might notice that the returned table doesn't include all the results
that you would find on the website. That is completely intentional. The
objective of this utility is to present a large enough variations of a a word,
without displaying the whole dictionary either. It also helps limiting the
width of the table, which becomes a mess if it is too wide.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for translate-term, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size translate-term-0.1.3.tar.gz (5.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page