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 814408b

Browse files
Merge pull request avinashkranjan#538 from NEERAJAP2001/Translator_python
Translator python
2 parents d26f74e + 2ad964c commit 814408b

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

‎Translator Script/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Translation Script
2+
Running this Script would translate one language to another language
3+
4+
# Dependency
5+
```pip install googletrans==3.1.0a0```
6+
7+
# Working
8+
* It works with the help of Google Trans Library
9+
* Run this command on a python interpreter ```python Translation.py```
10+
* Enter what you want to translate
11+
* Enter the Code of Language
12+
* Make sure to give correct language code in the script
13+
* Boom!! Here is the Translation
14+
15+
# Documentation for language Codes
16+
https://py-googletrans.readthedocs.io/en/latest/#googletrans-languages
17+
18+
# Example
19+
20+
```python Translation.py```
21+
22+
OUT: धन्यवाद

‎Translator Script/Translation.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Using the Translator Class
2+
from googletrans import Translator
3+
# Making Object of Translator Class
4+
translator = Translator()
5+
# Word you want to translate
6+
Word = input('Enter what you want to translate : ')
7+
# For further language Codes
8+
# https://py-googletrans.readthedocs.io/en/latest/#googletrans-languages
9+
Code = input('Enter Language Code : ')
10+
# Using the translator method to get work done
11+
translation = translator.translate(Word,dest=Code)
12+
print(translation.text)

0 commit comments

Comments
(0)

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