Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Translator Script/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Translation Script
Running this Script would translate one language to another language

# Dependency
```pip install googletrans==3.1.0a0```

# Working
* It works with the help of Google Trans Library
* Run this command on a python interpreter ```python Translation.py```
* Enter what you want to translate
* Enter the Code of Language
* Make sure to give correct language code in the script
* Boom!! Here is the Translation

# Documentation for language Codes
https://py-googletrans.readthedocs.io/en/latest/#googletrans-languages

# Example

```python Translation.py```

OUT: धन्यवाद
12 changes: 12 additions & 0 deletions Translator Script/Translation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Using the Translator Class
from googletrans import Translator
# Making Object of Translator Class
translator = Translator()
# Word you want to translate
Word = input('Enter what you want to translate : ')
# For further language Codes
# https://py-googletrans.readthedocs.io/en/latest/#googletrans-languages
Code = input('Enter Language Code : ')
# Using the translator method to get work done
translation = translator.translate(Word,dest=Code)
print(translation.text)