- Translate any words from a language to the desired target language in a simple GUI.
- Default language is 'DE' (German), but feel free to change the target language.
- Open cmd (Windows) or your terminal (Linux).
- Change into any directory where you want this repository to download to.
- Example:
cd ~/Downloads
- Example:
- Type
git clone https://github.com/JustinTrvz/deepl-translator-gui.git
.
- Git
- Python
- DeepL API Key
- Windows: Download and install Git.
- Linux: Execute
sudo apt-get install git
on command-line.
- Windows: See this tutorial: How to install Python on Windows
- Linux: Execute
sudo apt-get install python3-tk
on command-line.
- Visit DeepL API.
- Sign up for free API usage or login.
- Start free trial.
- Visit your DeepL Account Summary and copy the
Authentication Key for DeepL API
.- The key looks like:
kjdf39-345jernt-nt4ntr-nxckj7:abc
(Just an example! Do not use it!)
- The key looks like:
- Create a file
deepl_api.txt
in this directory and insert your copied DeepL API key.
- The DeepL Translator GUI is meant to be used while reading documents of a foreign language.
- Linux: You can right-click on the windows top bar and set it to
Always on top
. - Windows: Additional software like Microsoft PowerToys is needed, which allows to use always on top.
- Linux: You can right-click on the windows top bar and set it to
- Paste or type the words in the top text field and afterwards click on
Translate
. - The shortcut
Ctrl+A
select all the text from both text fields. - Only the textfield
Any language:
is modifyable.
- It is recommended to use a Python Venv.
- Change to this directory, if not already done.
cd <YOUR_WORK_DIR>/fixed-translator
- Create a Python venv in this directory.
python -m venv .
- Change to this directory, if not already done.
- Install pip packages.
pip install -r requirements.txt
- Execute the script.
python3 ./translator.py
- Open
translator.py
with your favorite editor. - In the section
# DeepL Translator config
you need to change the variableTARGET_LANGUAGE
to any ISO 639-1 code- Example:
TARGET_LANG = 'PL'
- Example:
TARGET_LANGUAGE_TEXT
to the coherent ISO language name- Example:
TARGET_LANG_TXT = 'Polish'
- Example:
- Same steps like describeb in section [Change target language](#Change target language), but with the variables
SOURCE_LANG
andSOURCE_LANG_TXT
.