Skip to main content

Python API For Google Translate

 Python Google Translate API

Hello Friends in this blog we will learn about Python API for translation. With the help of this API we can translate any language like google translator.
The name of this API is google-trans-new.

How to install this API:

>>> pip install google_trans_new

Insert this command in your command prompt to install this.


How it works:

  • To know the languages :
                 




It returns the dictionary of the languages.

  • How to translate:


The syntax of translate method is 
translator.translate(text, lang_tgt, lang_src)
Here,

  1. Text = Sentence/text which you want to translate.
  2. lang_tgt = key of that language in which you want to translate your text.
  3. lang_src = The language of your text. It takes auto by default.

Comments

Contact Form

Name

Email *

Message *

Popular posts from this blog

Rock Paper and Scissor Game Using Tkinter | Python |

 Rock Paper and Scissor Game Using Tkinter Hello Friends in this blog we will learn how to create Rock Paper & Scissor game using tkinter. Tkinter provides GUI toolkit. Tkinter is a built in library of python with the help of this we can create so many GUI applications. To create Rock Paper & Scissor game their are some conditions: Rock + Paper => Paper Win Rock+Scissor =>Rock Win Rock+Rock => Match Draw Paper+Rock => Paper win Paper+Scissor=> scissor win Paper+Paper => Draw Scissor+Paper => Scissor Win Scissor+Rock => Rock Win Scissor+Scissor =>Match Draw Our complete project is depend on this conditions. Steps to complete this project: 1. Import require modules and library 2. Create Basic GUI window for our projects: 3. Declare the values for computer & score of player and computer: 4. Create a function for Rock: 5. Create Function for Paper: 6. Create a function for Scissor: 7. Create a function to reset our game: This is code snippets of this