Google Translate API Integration in Python Without API Key – Translate Text Seamlessly in Terminal
202 views
Jun 3, 2025
Get the full source code of application here: https://gist.github.com/gauti123456/8c5c5b6c73e20b0f34234314c22dd271
View Video Transcript
0:00
uh hello guys welcome to this video so
0:02
in this video I will show you a module
0:05
in Python which you can directly use for
0:09
Google Translate features and the nice
0:11
thing about this module is that it it
0:14
actually provides you with all the
0:16
Google translate features without any
0:19
API key so it's completely free you can
0:21
use it for com uh unlimited usage the
0:26
module has pip install m translate so
0:30
just execute this command on the command
0:32
line pip install m translate so this is
0:35
the third party module uh simply install
0:38
this and it will install this module on
0:41
your machine so it will hardly take 5
0:44
seconds and after that I will show you
0:47
the script here that I written right
0:49
here you can have any text right here in
0:52
any language so this text is there in
0:54
the English language so we are
0:56
translating it to all the different
0:58
languages as you can see German French
1:00
Spanish Hindi Japanese Chinese Arabic
1:03
Russian Italian Portuguese so we declare
1:06
this uh object here so one by one uh so
1:10
if I run the script right here python
1:12
app.py so what you will see right here
1:15
it will translate the text one by one so
1:18
if I enter it you will see this is the
1:20
original text and one by one as you can
1:23
see here it is translating the text here
1:25
in different languages so we see the
1:28
original text and so these are the
1:30
translated text in different languages
1:33
so now to get started let me show you
1:37
the I will write this code step by step
1:40
and then explain to you
1:43
what so just make a simple app py file
1:47
and uh first of all we just need to
1:49
require this module so we simply say
1:51
from m translate we need to import the
1:56
translate
1:58
function so in this way you can actually
2:01
import this after that we actually
2:05
provide whatever text that you want to
2:07
translate so I will say my name is
2:10
Gotham and I am a
2:13
software developer
2:17
so you write your text that needs to be
2:20
translated and then we declare the set
2:22
of
2:23
languages in object here right here so
2:27
you just need require the twolet digit
2:30
code of each language so you can even
2:32
add mult more languages right here just
2:36
add the language name plus the twolet
2:39
digit country or language codes so you
2:42
can see that so we added these languages
2:45
after that we simply run we
2:49
provide we print out the original text
2:52
then we simply run a for
2:54
loop so this for loop will basically run
2:58
loop through all the languages that we
3:00
have inside this object one by one and
3:03
then it is using this translate module
3:05
that right here that we imported if you
3:08
see we imported this translate module so
3:10
it is using it and this function takes
3:13
three arguments first of all the text
3:15
that needs to be translated secondly the
3:18
language
3:19
code this is actually the language code
3:21
for each language if you see Russian
3:23
Arabic so you're passing it then the
3:26
third option is the English language
3:27
that the text is originally in so then
3:30
we basically show the translated text so
3:35
this is really easy now uh so if I show
3:38
you if I run this Python
3:41
script original text at UC and then you
3:44
see the text in different languages so
3:47
if you're building any sort of
3:48
application related to translating of
3:51
languages then you can use this module
3:53
completely free it provides you with
3:55
Google translate features for completely
3:58
free as you can see we haven't used any
4:00
API key but still we actually use this
4:03
module the Google translate features so
4:06
you can do this unlimited number of
4:08
times so there is no kind of restriction
4:10
right here and it's completely free so
4:13
in this way you can integrate your
4:14
Google translate API inside Python and
4:18
uh also check out my website
4:20
freemediatools.com and al I will be
4:23
seeing you in the next
#Foreign Language Resources
#Programming
#Scripting Languages
#Software