Amazing-Python-Scripts

Форк
0

README.md

Multi-Language Translation

This is an amazing python script that lets you translate a single phrase into multiple languages using google translate's API.

Get Started

Here you will learn how to run the python script, just follow these steps in order and you will be a polyglot in no time!

  1. Go to RapidAPI's Google Translate API.
  2. Get your free rapidAPI key by clicking on the subscribe button and choosing the free plan.
  3. Copy your API key under X-RapidAPI-Key.
  4. Just paste this key under the 'X-RapidAPI-Key' in the main.py file.
  5. Here are the function parameters you need: languages:list&phrase:str. Refer below for a list of supported languages.
  6. Just enter the parameters in the function call
  7. run pip install-r requirements.txt.
  8. Run the main.py file.

Sample Request

print(multi_translate(["ru","fr"],"hello"))

Output

hello
{'ru': 'привет', 'fr': 'Salut'} 

Supported Languages

LanguageCode
Afrikaansaf
Albaniansq
Amharicam
Arabicar
Armenianhy
Azerbaijaniaz
Basqueeu
Belarusianbe
Bengalibn
Bosnianbs
Bulgarianbg
Catalanca
Cebuanoceb
Chinese (Simplified)zh-CN
Chinese (Traditional)zh-TW
Corsicanco
Croatianhr
Czechcs
Danishda
Dutchnl
Englishen
Esperantoeo
Estonianet
Finnishfi
Frenchfr
Frisianfy
Galiciangl
Georgianka
Germande
Greekel
Gujaratigu
Haitian Creoleht
Hausaha
Hawaiianhaw
Hebrewhe**
Hindihi
Hmonghmn
Hungarianhu
Icelandicis
Igboig
Indonesianid
Irishga
Italianit
Japaneseja
Javanesejw
Kannadakn
Kazakhkk
Khmerkm
Koreanko
Kurdishku
Kyrgyzky
Laolo
Latinla
Latvianlv
Lithuanianlt
Luxembourgishlb
Macedonianmk
Malagasymg
Malayms
Malayalamml
Maltesemt
Maorimi
Marathimr
Mongolianmn
Myanmar (Burmese)my
Nepaline
Norwegianno
Nyanja (Chichewa)ny
Pashtops
Persianfa
Polishpl
Portuguese (Portugal, Brazil)pt
Punjabipa
Romanianro
Russianru
Samoansm
Scots Gaelicgd
Serbiansr
Sesothost
Shonasn
Sindhisd
Sinhala (Sinhalese)si
Slovaksk
Sloveniansl
Somaliso
Spanishes
Sundanesesu
Swahilisw
Swedishsv
Tagalog (Filipino)tl
Tajiktg
Tamilta
Telugute
Thaith
Turkishtr
Ukrainianuk
Urduur
Uzbekuz
Vietnamesevi
Welshcy
Xhosaxh
Yiddishyi
Yorubayo
Zuluzu

Author

Archit Kohli

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.