Python 3 argostranslate Library Script to Integrate Google Translate between Languages Using DeepAI
2K views
Jun 3, 2025
Get the full source code of application here: https://gist.github.com/gauti123456/05b3b8dc13a250780908b6aec328767e
View Video Transcript
0:00
uh hello guys welcome to this video So
0:02
in this video I will show you how to
0:04
integrate the Google translate API using
0:07
a free Python package which allows you
0:09
to translate uh sentences from one
0:12
language to another and uh the basic it
0:15
supports all the languages which are
0:17
there which are there in Google
0:19
translate So this is actually a python
0:21
script here and uh as you can see here
0:25
we are translating it from English to
0:28
Spanish Here you can see we have
0:29
provided this twolet digit code of
0:31
English and then
0:33
ES So if I just uh execute this script
0:36
here just type python app.py So you will
0:40
see that it will translate this text
0:42
here Hello world my name is Gotham and
0:44
I'm from a developer from India You can
0:46
see it's an English
0:48
language And then it will translate
0:50
English to Spanish here You can see it
0:52
translated the syntax successfully to
0:55
Spanish here And similarly you can try
0:58
this for more languages You just need to
1:00
replace the two letter digit uh language
1:03
code So ES is for Spanish here EN for
1:07
English So let me show you the module
1:09
here Uh it's a free module of Python Uh
1:12
if you just go to Google and just search
1:14
for this module I have given the full
1:17
source code in the description of this
1:19
video So this is the module here They
1:23
have their GitHub page here Uh it's an
1:25
open-source offline translation library
1:28
written in Python It also uses deep AI
1:31
in the
1:32
background and the command is simple
1:35
here pip install argon translate Just
1:39
copy this command and just go to your
1:41
command line and simply execute this
1:43
command pip install argon
1:45
translate and I have already installed
1:47
it So this will take some time to
1:49
install So simply execute and install it
1:52
And uh after that just make a simple app
1:56
py file and then we simply import this
2:00
package like
2:06
this After that we specify from which
2:09
language you want to convert So we need
2:11
to convert from English language to
2:13
Spanish language So after putting this
2:17
we just need to initialize some more
2:19
configuration code here like this
2:22
package update package index So the very
2:26
first time it will run it will take some
2:29
time So don't worry about it Just run
2:32
this After it installs all the DPI deep
2:37
models it will subsequently it will not
2:40
take uh much time So the very first time
2:43
it will run it will take some time So
2:45
I've already run that you can see it is
2:48
giving me suggestions as well
2:53
So then we need to
2:59
simply package to
3:03
install This is all the necessary
3:06
configuration code guys that you do need
3:08
to write here
3:10
So I have given the script in the
3:13
description of the video So let me just
3:15
summarize you what is happening right
3:16
here So the main thing is that this
3:19
actually contains a function here If you
3:21
see translate function this library here
3:25
you specify your sentence here Whichever
3:28
sentence you need to translate So we
3:30
providing a very simple sentence here in
3:33
English language And here we specify we
3:36
need to translate from English language
3:38
to Spanish So specify this uh twoletter
3:42
digit
3:43
codes language code So after we do this
3:49
uh we run
3:55
this So if you're running it for the
3:57
very first time it will take about 5 to
4:00
6 minutes to install all the necessary
4:02
packages and then it will actually
4:04
translate your sentence you will see it
4:07
will this is your Spanish version you
4:09
can change this uh let's suppose I want
4:12
to change to French so I will say fr so
4:15
now I need to translate from English to
4:18
French so now what happens again you
4:20
will see it will translate English to
4:23
French
4:25
so you will see now it has translated to
4:29
French language so it supports all the
4:31
languages that Google translate supports
4:34
so you can try this package The nice
4:36
thing is that you don't require any sort
4:38
of API key You can see we are not using
4:41
any API key So it can be used unl
4:44
unlimited number of time You can use
4:47
this package to build any sort of web
4:48
application which translates from one
4:51
language to another
4:54
So thank you very much for watching this
4:56
video and also check out my website
4:58
freemediatools.com
5:00
uh which contains thousands of tools
#Foreign Language Resources
#Open Source
#Scripting Languages