Command-line Translation: Hi, Translate Shell!
We used AI while writing this content.
Translate Shell?
| Open-source? | ✅ |
| Cost estimation | 🆓 |
| Author | Mort Yao |
| Usage Case | Command-line translation and speech synthesis |
| Dependency | Terminal, Bash/Zsh, Internet connection |
Advantages
- Free and open-source
- Works directly from the terminal
- Supports 100+ languages via Google Translate, Bing, Yandex
- Text-to-speech synthesis
- Simple syntax
- Lightweight and fast
- Scriptable and automatable
Unlike web-based translators, Translate Shell provides instant translations without leaving your terminal environment, making it ideal for developers, writers, and multilingual users who prefer keyboard-driven workflows.
Platforms supported
| Linux | macOS | Windows | |
|---|---|---|---|
| Availability | ✅ | ✅ | ✅ (via WSL/Git Bash) |
| Open-source | ✅ | ✅ | ✅ |
| Price | 🆓 | 🆓 | 🆓 |
Setup
Linux installation
sudo apt install translate-shell
macOS installation
brew install translate-shell
Windows installation
Install via Git Bash or WSL (Windows Subsystem for Linux), then follow Linux instructions.
Basic usage
Translate a word or phrase:
trans "hello world"
trans en:fr "hello world" # -b Brief mode (translation only)
Setting up speech synthesis and audio playback
Translate Shell supports text-to-speech, but requires external tools:
Install speech synthesizer et audio player
sudo apt install espeak-ng mpg123
Configure Translate Shell
nano ~/.trans
Add the following:
# ~/.trans configuration
# Default audio player
player mpg123
# Default speech synthesizer
speaker espeak-ng
# Optional: set default source and target languages
default -s en -t fr
Save and exit (in nano: CTRL+O → Enter → CTRL+X).
Test speech synthesis
trans -speak "hello world"
The translation should be spoken aloud.
Further help
Visit the official GitHub repository.
Copyleft Statement
Renoncé du droit d'auteur
Much of our content is freely available under the Creative Commons BY-NC-ND 4.0 licence, which allows free distribution and republishing of our content for non-commercial purposes, as long as Ronzz.org is appropriately credited and the content is not being modified materially to express a different meaning than it is originally intended for. It must be noted that some images on Ronzz.org are the intellectual property of third parties. Our permission to use those images may not cover your reproduction. This does not affect your statutory rights.
Nous mettons la plupart de nos contenus disponibles gratuitement sous la licence Creative Commons By-NC-ND 4.0, qui permet une distribution et une republication gratuites de notre contenu à des fins non commerciales, tant que Ronzz.org est correctement crédité et que le contenu n'est pas modifié matériellement pour exprimer un sens différent que prévu à l'origine.Il faut noter que certaines images sur Ronzz.org sont des propriétés intellectuelles de tiers. Notre autorisation d'utiliser ces images peut ne pas couvrir votre reproduction. Cela n'affecte pas vos droits statutaires.
Member discussion