title: How to use google or microsoft translator api with python to translate text files?
body: <p>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:</p>
  
  <pre><code>Hello, my name is Stefan. I live in Germany and my hobbies are tennis, walking and reading.
  </code></pre>
  
  <p>My question now is how to read in the text file and automatically translate it from English to German.</p>
  
  <p>I looked around the web for quite a while but I couldn't find a solution to my problem.</p>
  
  <p>Any direct help or linkage to another post/website is greatly appreciated.</p>