Making a language translator in python using panclus.

Ayush Moghe
Panclus
Published in
2 min readFeb 22, 2021

Panclus tutorials…

In python there are several libraries to translate texts. Today we are going to make a translator using python’s panclus library. Panclus is a library in python created by Ayush Moghe that is useful in various fields of python programming like converting speech to text, predicting the date of solar and lunar eclipse and much more in a single line of code. If you want the tutorial for panclus then click here.

Translate your text with panclus!

There are many translating apps on play store as well as google translate also but this time we are not going to do any type of web scrapping we will make our translator in just 3–5 lines.

Like google translate panclus translator works a little better than google.

Installation of panclus:

pip install panclus

Installation in idle:

import pip
pip.main(['install','panclus'])

Below is the Panclus’ Logo:

Logo of panclus

Not only this there are many logos for panclus.

Now we will proceed for making our translator…

Below is the code for translator:

from PanclusGz import Gz as gz
while True:
f_lang=input('enter the language from which you want to translate: ')
t_lang=input('enter the language into which you want to translate: ')
text=input('enter your text: ')
print(gz.translate(f_lang,t_lang,text))

In repl the above code will output like this:

But in python’s official idle this translation will be displayed much better.

If you want more information on panclus please visit following links:

  1. Tutorial
  2. Facts
  3. Pypi
  4. Github

--

--

Ayush Moghe
Panclus
0 Followers
Editor for

I started learning python when I was in seventh class and now I am learning advanced c++, Julia and Javascript.