||6 months ago|
|LICENSE.md||6 months ago|
|README.md||6 months ago|
|main.py||6 months ago|
Python DeepL Translator
An extremely simple, cross-platform translator using the DeepL Free API.
This simple translator application does one thing and one thing only: it sends off text to the DeepL Free API to be translated. That's it! (This functionality may be extended in the future to enable document translation.)
- DeepL API Key
- Python >= 3.8
Firstly, you'll need to get a DeepL API key.
You'll need to set this as an environment variable called
in the environment where you're running the program. For example, on a
Unix-like OS open a terminal and type:
If you plan to use this regularly, you may want to put the above line (with your
actual key) in a plaintext file and then simply
Alternatively, you can simply put your DeepL key in a text file and load it using the "Load Key" button in the application.
Secondly, you'll need Python >= 3.8 and Tkinter. If you're using a Unix-like OS, you should already have Python, and need only confirm you have Tkinter. On many Linux-based distributions, you'll need to install Tkinter through your package manager. I cannot afford a Mac to know if it's already installed there.
If you're on Windows, you'll need to download Python, but this version should bundle Tkinter.
git clone https://git.trees.st/Marie-Joseph/DeepL-Translator.git cd DeepL-Translator source /path/to/API/key.txt # or: export DEEPL_AUTH_KEY="your-API-key" python main.py
From there, simply enter the text you desire translated on the left, select the target language from the list on the upper-right, and click "Translate".
Bugs, Issues, Quirks, etc.
- the free API has a limited language set and only these are provided as targets
- Tkinter's listboxes are tricky so only target languages are supported; source language is determined automatically (hopefully this will change)