Skip to content
Related Articles

Related Articles

Deepl – Command Line Language Translator Tool for Linux
  • Last Updated : 14 Feb, 2021
GeeksforGeeks - Summer Carnival Banner

Deepl is the best language translator command-line tool that detects the language of input text and translates it into the desired language using advanced machine learning and neural networking algorithms. It is open source and powered by a German tech Company under the MIT license.

It supports the following languages 

  • English (EN)
  • Italian (IT)
  • Spanish (ES)
  • Polish (PL)
  • French (FR)
  • German (DE)
  • Dutch (NL)

It also provides a paid subscription for the interested user and also has a free version (Deepl — CLI Translator Tool). This article will discuss the installation steps of the Deepl — CLI Translator Tool and the use of this Tool with some examples. 

Note: we will see a screenshot of only Ubuntu Linux Machine cause all Linux versions has similarity in installation process run all these command same as Ubuntu.

Installation of Deepl — CLI Translator Step-Wise

Step 1: Install the latest version of the Node.Js or If you have already installed then check the version of Node.js and it should be > 6.0



Deepl - Command Line Language Translator Tool for Linux

Step 2: Install Yarn package dependency manager in Linux Distribution

For different Linux distribution Run different Following Commands.

For Ubuntu:

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install yarn
yarn --version 

Deepl - Command Line Language Translator Tool for Linux

For Centos / Fedora / RHEL:

curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
curl --silent --location https://rpm.nodesource.com/setup_12.x | sudo bash -
yum install yarn  [On CentOS/RHEL Linux distribution ]
dnf install yarn  [On Fedora Linux distribution ]
yarn --version 

For Gentoo Linux:

sudo emerge --ask sys-apps/yarn
yarn --version 

Installation of Deepl – CLI Translator Tool:

Step 3: Now, Install Deepl – CLI Translator Tool



 yarn global add deepl-translator-cli

Deepl - Command Line Language Translator Tool for Linux

Step 4: Check Installation

deepl --version 
or
./yarn/bin/deepl  --version 

Deepl - Command Line Language Translator Tool for Linux

Use of Deepl – CLI Translator Tool:

To Translate the text:

deepl translate  -t  '${ target_language_ISO_code }' '${ Input_string }'

To detect the language:

deepl detect   '${ target_language_ISO_code }' '${ Input_string }

To get a better understanding you can see the following drawing:

Deepl - Command Line Language Translator Tool for Linux

Example:

Command: deepl translate -t ‘DE’ ‘geeks for geeks is the best site’

Output : ‘geeks für geeks ist die beste Seite’

Explanation : Here given above command has three part 

  1. Initial Command Syntax to translate → deepl translate -t 
  2. target language ISO code → ‘DE’ (for german)
  3. Sentence that you want to translate → ‘geeks for geeks is the best site’

Command : deepl detect ‘geeks for geeks is the best site’

Output : English(EN)

Explanation : Here given above command has only two part

  1. Initial Command Syntax to translate → deepl detect
  2. Sentence for that you want to detect language → ‘geeks for geeks is the best site’

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up
Recommended Articles
Page :