Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3fc019a

Browse files
Update Translation.py
1 parent 08d2239 commit 3fc019a

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

‎Translator Script/Translation.py‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
23
# First Step : Go to cmd and type: pip install googletrans==3.1.0a0
34

45

@@ -8,11 +9,19 @@
89
# Making Object of Translator Class
910
translator = Translator()
1011

11-
# Using the translator method to get work done
12+
13+
# Word you want to translate
14+
Word = input('Enter what you want to translate : ')
15+
16+
1217

1318
# For further language Codes
1419
# https://py-googletrans.readthedocs.io/en/latest/#googletrans-languages
15-
translation = translator.translate("Thanks",dest="hi")
20+
Code = input('Enter Language Code : ')
21+
22+
23+
# Using the translator method to get work done
24+
translation = translator.translate(Word,dest=Code)
1625

1726
# printing to console
18-
print(translation.text)
27+
print(translation.text)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /