Skip to content

Translate any words from a language to the desired target language in a simple GUI.

Notifications You must be signed in to change notification settings

JustinTrvz/deepl-translator-gui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DeepL Translator GUI

  • 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.

Download repository

  1. Open cmd (Windows) or your terminal (Linux).
  2. Change into any directory where you want this repository to download to.
    1. Example: cd ~/Downloads
  3. Type git clone https://github.com/JustinTrvz/deepl-translator-gui.git.

Requirements

  • Git
  • Python
  • DeepL API Key

Git

  • Windows: Download and install Git.
  • Linux: Execute sudo apt-get install git on command-line.

Python

DeepL API Key

  1. Visit DeepL API.
  2. Sign up for free API usage or login.
  3. Start free trial.
  4. 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!)
  5. Create a file deepl_api.txt in this directory and insert your copied DeepL API key.

Usage

  • 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.
  • 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.

Setup

  1. It is recommended to use a Python Venv.
    1. Change to this directory, if not already done.
      • cd <YOUR_WORK_DIR>/fixed-translator
    2. Create a Python venv in this directory.
      • python -m venv .
  2. Install pip packages.
    1. pip install -r requirements.txt
  3. Execute the script.
    1. python3 ./translator.py

Change target language

  1. Open translator.py with your favorite editor.
  2. In the section # DeepL Translator config you need to change the variable
    1. TARGET_LANGUAGE to any ISO 639-1 code
      1. Example: TARGET_LANG = 'PL'
    2. TARGET_LANGUAGE_TEXT to the coherent ISO language name
      1. Example: TARGET_LANG_TXT = 'Polish'

Change source language

  • Same steps like describeb in section [Change target language](#Change target language), but with the variables SOURCE_LANG and SOURCE_LANG_TXT.

About

Translate any words from a language to the desired target language in a simple GUI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages