A simple real time translation of PDF papers written in rust for Windows and Linux users, with a translation API for Google and DeepL. To avoid misunderstandings, rename the program from rust-translator
to translator-rs
.
- A simple selection can be translated to speed up reading papers.
- Long sentence translation with automatic sentence break.
- Support single word to view detailed similar translation.
Please install the xsel
package before using it.
sudo apt install xsel
sudo dnf install xsel
Make sure you have powershell
on your Windows computer.
Download and unpack the package from the release page.
If the binary file is already in the PATH directory, you can run the following command directly.
translator-rs
If not, use the terminal run with following command.
./translator-rs
./transaltor-rs.exe --use-clipboard
Click on a word or a paragraph (tested on Ubuntu 22.04 Gnome with Wayland and X11 desktop environment and Kubuntu22.04 Plasma desktop).
O
stands for original textT
stands for translation textA
stands for alternative text
We offer two color scheme options
Light
Dark
Switch from the default google translate to deepl. The translation API for DeepL is now supported, but requires the user to have an auth key.
translator-rs -a deepl --auth-key xxxxxxxx:xx
or pro
translator-rs -a deeplpro --auth-key xxxxxxxx:xx
The Google Translate API has been blacklisted in China (2022-9-29), according to the latest firewall rules (GFW), so a proxy option has been added.
If there is an access timeout, please consider setting a proxy for the translation software, which currently supports the following proxies.
- https proxy
- socks5 proxy
translator-rs -p socks5://YOUR_PROXY_SERVER_IP:YOUR_PROXY_SERVER_PORT
The languages currently supported for translation include, default source language is English, and target language is Chinese.
- English
- Chinese (Simplified)
- Chinese (Traditional)
- Japanese
- Spanish
- Russian
- Korean
- French
- German
- Italian
If you need to translate into another language rather then default, use the following command to specify source language
and target language
.
translator-rs -s Engligh -t French
If you think the translation speed is slow, you can use fast
mode (power consumption may be higher than default mode, default interval is 1.0
sec, you can change it to 0.1
sec).
translator-rs -f 0.1
New clear screen mode. The default parameter in this mode clears the previous translations for each n
translation.
translator-rs -c
If you want to clear the screen after three translations, you can use the following command.
translator-rs -c 3
New option of not showing original text. If you want to not show the original text when translating, you can use the following options.
translator-rs --no-original
Added no automatic sentence break. If you do not want to break the sentence automatically, you can use the option.
translator-rs --disable-auto-break
Added support for some applications on Linux that do not automatically get selected text. Some Linux applications (like Zotero
) have the function of intercepting the text selection system call, please select the text then copying it via ctrl-c
.
translator-rs --use-clipboard