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 xselsudo dnf install xselMake 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-rsIf not, use the terminal run with following command.
./translator-rs./transaltor-rs.exe --use-clipboardClick on a word or a paragraph (tested on Ubuntu 22.04 Gnome with Wayland and X11 desktop environment and Kubuntu22.04 Plasma desktop).
Ostands for original textTstands for translation textAstands 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:xxor pro
translator-rs -a deeplpro --auth-key xxxxxxxx:xxThe 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_PORTThe 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 FrenchIf 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.1New clear screen mode. The default parameter in this mode clears the previous translations for each n translation.
translator-rs -cIf you want to clear the screen after three translations, you can use the following command.
translator-rs -c 3New 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-originalAdded no automatic sentence break. If you do not want to break the sentence automatically, you can use the option.
translator-rs --disable-auto-breakAdded 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
