I would like to automatically pre-translate a bunch of text files that I have on my hard disk. Is there a way to do this with python. I already got the google translate api key and I would like to use that. The files I have include some XML code, however, I first would like to get the translator to work with some plain text files. One text file might look like this:
Hello, my name is Stefan. I live in Germany and my hobbies are tennis, walking and reading.
My question now is how to read in the text file and automatically translate it from English to German.
I looked around the web for quite a while but I couldn't find a solution to my problem.
Any direct help or linkage to another post/website is greatly appreciated.