A simple python library used to translate and speak a given text from the user with Google Translation using user's Chrome browser.
Project description
selenium_translation
Selenium_translation is a simple python library to translate any other language or transform it to speech with google traduction , all that using the user's Chrome browser in hidden mode , mean time to return the translation or speech 15 seconds
Installation :
| $ pip install selenium_translation |
Simple usage :
| >>> from selenium_translation import Chrome |
| >>> test=Chrome() |
| >>> print( test.translate_text(text='Bonjour',from_lang='fr',to_lang='fr') )|
| >>> Good morning |
Methods :
Methods | Return |
---|---|
translation_url(from_lang=str,to_lang=str) | url of google translation (str) |
translation_text_url(text=str,from_lang=str,to_lang=str) | url of the translation needed (str) |
translate_text(text=str,from_lang=str,to_lang=str) | translation of text (str) |
text_2_speech(text=str, language=str) | None , text speech |
translation_2_speech(text=str,from_lang=str,to_lang=str) | None , translation speech |
Note :
Use language codes >>> ISO-639 Language Codes
example :
Arabic:ar
French:fr
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file auto_translation-0.1.4.tar.gz
.
File metadata
- Download URL: auto_translation-0.1.4.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65bb4e31ded5bc599e380981c9abb3812ea970ba1e21b6d4bc185e266da3ecaf |
|
MD5 | 11116229af9f017d51a5f92c9504fabf |
|
BLAKE2b-256 | f4db6dc48ae7b18c15f707d469875c9cccd26154d321710831427edfb599f5df |