https://github.com/ultrafunkamsterdam/googletranslate
Python Google Translate (using reverse-engineered public API, so free)
https://github.com/ultrafunkamsterdam/googletranslate
api command-line commandline free google module public python reverse-engineering tool translate translation utility
Last synced: 5 months ago
JSON representation
Python Google Translate (using reverse-engineered public API, so free)
- Host: GitHub
- URL: https://github.com/ultrafunkamsterdam/googletranslate
- Owner: ultrafunkamsterdam
- Created: 2019-08-25T13:32:37.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-11-16T13:46:55.000Z (over 1 year ago)
- Last Synced: 2025-01-11T20:13:35.471Z (6 months ago)
- Topics: api, command-line, commandline, free, google, module, public, python, reverse-engineering, tool, translate, translation, utility
- Language: Python
- Homepage:
- Size: 37.1 KB
- Stars: 153
- Watchers: 10
- Forks: 28
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
```
████████╗██████╗ █████╗ ███╗ ██╗███████╗██╗ █████╗ ████████╗███████╗
╚══██╔══╝██╔══██╗██╔══██╗████╗ ██║██╔════╝██║ ██╔══██╗╚══██╔══╝██╔════╝
██║ ██████╔╝███████║██╔██╗ ██║███████╗██║ ███████║ ██║ █████╗
██║ ██╔══██╗██╔══██║██║╚██╗██║╚════██║██║ ██╔══██║ ██║ ██╔══╝
██║ ██║ ██║██║ ██║██║ ╚████║███████║███████╗██║ ██║ ██║ ███████╗
╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝╚══════╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝
```UltrafunkAmsterdam
Google translate "without" limits and without API key
## installation ##
pip3 install git+https://github.com/ultrafunkamsterdam/googletranslate## usage: ##
```python
>>>from googletranslate import translate>>> translate( 'Have fun using this!', 'nl')
'Veel plezier ermee!'# you could also explicitly specify source and/or destination language.
>>> translate( 'have fun using this', dest='nl', src='en' )>>> translate( 'Have fun using this!', 'fr')
'Amusez-vous en utilisant cela!'>>> translate( 'Have fun using this!', 'de', 'en')
'Viel Spaß damit!'# usage variation 1
>>> from googletranslate import Translator
>>> to_japanese = Translator('ja')
>>> print('lets do something japanese...', to_japanese('Good afternoon!'))
lets do something japanese... こんにちは!# usage variation 2 : translate files
>>> from googletranslate import Translator
>>> translator = Translator('es')
>>> with open(somedocument.txt, 'r') as infile, open(somespanishdocument.txt, 'w+') as outfile:
# i recommend writing a custom function which translates bigger chunks to minimize the amount of api calls.
for line in infile:
outfile.write(translator(line))
```