Crow Translate is a simple and lightweight translator written in C++ / Qt that allows you to translate and speak text using Google, Yandex, Bing, LibreTranslate and Lingva translate API.
Features
- Translate and speak text from screen or selection
- Support 125 different languages
- Low memory consumption (~20MB)
- Highly customizable shortcuts
- Command-line interface with rich options
- D-Bus API
- Available for Linux and Windows
Installation
Windows
🌐 Installer from the Releases page.
sudo scoop install crow-translate -g
Note: Windows requires Microsoft Visual C++ Redistributable 2019 to work.
Linux
Arch Linux, Manjaro, Chakra, etc
git clone https://aur.archlinux.org/crow-translate.git
cd crow-translate
makepkg -si
git clone https://aur.archlinux.org/crow-translate-git.git
cd crow-translate-git
makepkg -si
sudo pacman -S crow-translate
Ubuntu, Linux Mint, KDE Neon, etc
🌐 Package the Releases page.
sudo add-apt-repository ppa:jonmagon/crow-translate
sudo apt update
sudo apt install crow-translate
Fedora
🌐 Package the Releases page.
sudo dnf copr enable carlis/crow-translate
sudo dnf install crow-translate
CentOS, RHEL
sudo yum copr enable carlis/crow-translate
sudo yum install crow-translate
Mageia 7
# With urpmi
sudo urpmi urpmi.addmedia --wget --distrib http://ftp.blogdrake.net/mageia/mageia7/x86_64 # Or i586
sudo urpmi crow-translate
# Or with dnf
sudo dnf config-manager --add-repo http://ftp.blogdrake.net/mageia/BDK.repo
sudo dnf install crow-translate
openSUSE Tumbleweed
sudo zypper install crow-translate
openSUSE Leap
Solus
sudo eopkg it crow-translate
Flatpak
📦 Flathub
flatpak install flathub io.crow_translate.CrowTranslate
Note: To make the application look native on a non-KDE desktop environment, you need to configure Qt applications styling. This can be done by using qt5ct or adwaita-qt5 or qtstyleplugins. Please check the appropriate installation guide for your distribution.
Default keyboard shortcuts
You can change them in the settings. Some key sequences may not be available due to OS limitations.
Wayland does not support global shortcuts registration, but you can use D-Bus to bind actions in the system settings. For desktop environments that support additional applications actions (KDE, for example) you will see them predefined in the system shortcut settings. You can also use them for X11 sessions, but you need to disable global shortcuts registration in the application settings to avoid conflicts.
Global
Key | Description |
---|---|
Ctrl + Alt + E | Translate selected text |
Ctrl + Alt + S | Speak selected text |
Ctrl + Alt + F | Speak translation of selected text |
Ctrl + Alt + G | Stop speaking |
Ctrl + Alt + C | Show main window |
Ctrl + Alt + I | Recognize text in screen area |
Ctrl + Alt + O | Translate text in screen area |
In main window
Key | Description |
---|---|
Ctrl + Return | Translate |
Ctrl + R | Swap languages |
Ctrl + Q | Close window |
Ctrl + S | Speak source / pause text speaking |
Ctrl + Shift + S | Speak translation / pause text speaking |
Ctrl + Shift + C | Copy translation to clipboard |
CLI commands
The program also has a console interface.
Usage: crow [options] text
Option | Description |
---|---|
-h, --help | Display help |
-v, --version | Display version information |
-c, --codes | Display language codes |
-s, --source <code> | Specify the source language (by default, engine will try to determine the language on its own) |
-t, --translation <code> | Specify the translation language(s), splitted by '+' (by default, the system language is used) |
-l, --locale <code> | Specify the translator language (by default, the system language is used) |
-e, --engine <engine> | Specify the translator engine ('google', 'yandex', 'bing', 'libretranslate' or 'lingva'), Google is used by default |
-p, --speak-translation | Speak the translation |
-u, --speak-source | Speak the source |
-f, --file | Read source text from files. Arguments will be interpreted as file paths |
-i, --stdin | Add stdin data to source text |
-a, --audio-only | Print text only for speaking when using --speak-translation or --speak-source |
-b, --brief | Print only translations |
-j, --json | Print output formatted as JSON |
Note: If you do not pass startup arguments to the program, the GUI starts.
D-Bus API
io.crow_translate.CrowTranslate
├── /io/crow_translate/CrowTranslate/Ocr
| └── method void io.crow_translate.CrowTranslate.Ocr.setParameters(QVariantMap parameters);
└── /io/crow_translate/CrowTranslate/MainWindow
| # Global shortcuts
├── method void io.crow_translate.CrowTranslate.MainWindow.translateSelection();
├── method void io.crow_translate.CrowTranslate.MainWindow.speakSelection();
├── method void io.crow_translate.CrowTranslate.MainWindow.speakTranslatedSelection();
├── method void io.crow_translate.CrowTranslate.MainWindow.playPauseSpeaking();
├── method void io.crow_translate.CrowTranslate.MainWindow.stopSpeaking();
├── method void io.crow_translate.CrowTranslate.MainWindow.open();
├── method void io.crow_translate.CrowTranslate.MainWindow.copyTranslatedSelection();
├── method void io.crow_translate.CrowTranslate.MainWindow.recognizeScreenArea();
├── method void io.crow_translate.CrowTranslate.MainWindow.translateScreenArea();
├── method void io.crow_translate.CrowTranslate.MainWindow.delayedRecognizeScreenArea();
├── method void io.crow_translate.CrowTranslate.MainWindow.delayedTranslateScreenArea();
| # Main window shortcuts
├── method void io.crow_translate.CrowTranslate.MainWindow.clearText();
├── method void io.crow_translate.CrowTranslate.MainWindow.cancelOperation();
├── method void io.crow_translate.CrowTranslate.MainWindow.swapLanguages();
├── method void io.crow_translate.CrowTranslate.MainWindow.openSettings();
├── method void io.crow_translate.CrowTranslate.MainWindow.setAutoTranslateEnabled(bool enabled);
├── method void io.crow_translate.CrowTranslate.MainWindow.copySourceText();
├── method void io.crow_translate.CrowTranslate.MainWindow.copyTranslation();
├── method void io.crow_translate.CrowTranslate.MainWindow.copyAllTranslationInfo();
└── method void io.crow_translate.CrowTranslate.MainWindow.quit();
For example, you can show main window using dbus-send
:
dbus-send --type=method_call --dest=io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow io.crow_translate.CrowTranslate.MainWindow.open
Or via qdbus
:
qdbus io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow io.crow_translate.CrowTranslate.MainWindow.open
# or shorter
qdbus io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow open