TRANSLATE ANY LANGUAGE USING PYTHON CODE


Steps to follow : –

  1. Import googletrans module
  2. Enter text which you want to translate
  3. Then operate them using translate function and with translator module.
  4. See the output.
  5. I basically used english then converted into hindi. You can translate any language by your choice. It can be possible by entering language code like
  1. English : en

2. Hindi : hi

3. Danish : da

4. Dutch : nl

5. French : fr

6. German : de

And to know about all language code go to this link of Wikipedia : –

https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

Python Code

from googletrans import Translator
letter = str(input(“enter text : “))
translator = Translator()
translated_letter = translator.translate(letter,src=’en’,dest=’hi’)
print(translated_letter.text)

To follow my blog to click below

© WebCoder.com

Please follow me on social media pages : –

Facebook

Twitter

LinkedIn

One thought on “TRANSLATE ANY LANGUAGE USING PYTHON CODE

  1. I’m extremely impressed with your writing abilities and also with the structure for your blog. Is that this a paid subject or did you modify it your self? Anyway stay up the nice quality writing, it’s rare to look a nice weblog like this one these days.

    Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s