Search notes:

Python library: googletrans

2023-07-30: I had to install version 4.0.0rc1, not the default version (see this and this Stackoverflow answer, and this Github discussion)
$ sudo pip install googletrans==4.0.0rc1
Translate a German sentence to english:
from googletrans import Translator
translator = Translator()

t = translator.translate(
  'Kinder, das Essen wird kalt!',
   src ='de',
   dest='en'
)

print(t.text)

See also

The Python libraries deep_translator and Python library: translators.

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759561879, '216.73.216.149', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Python/libraries/googletrans(50): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78