title: How to access JSON translation from Google Translate API with Python
body: <p>I'm trying to learn Serbian atm and got myself a csv file with the most frequently used words.<br>
  What I'd like to do now is have my script put each word into Google Translate via the API and save this translation to the same file.<br>
  Since I'm a total Python and JSON beginner I am massively confused about how to use the JSON I'm getting from the API.</p>
  
  <p>How do I get to the translation?</p>
  
  <pre><code>from sys import argv
  from apiclient.discovery import build
  import csv
  import json
  
  script, filename = argv
  serbian_words = []
  
  # Open a CSV file with the serbian words in one column (one per row)
  with open(filename, 'rb') as csvfile:
  
      serbianreader = csv.reader(csvfile)
  
      for row in serbianreader:
  
          # Put all words in one single list
          serbian_words.extend(row)
  
          # send that list to google item by item to have it translated
          def main():
  
              service = build('translate', 'v2',
              developerKey='xxx')
  
              for word in serbian_words:
  
                  translation = service.translations().list(
                      source='sr',
                      target='de',
                      q = word
                      ).execute()
  
                      print translation # Until here everything works totally fine.
  
  
  
  if __name__ == '__main__':
    main()
  </code></pre>
  
  <p>What Terminal prints for me looks like this <code>{u'translations': [{u'translatedText': u'allein'}]}</code> where the "allein" is the german translation of a serbian word.</p>
  
  <p>How can I get to the "allein"? I've tried to figure this out by trying to implement the json Encoder and Decoder that comes with Python, but I can't figure it out.</p>
  
  <p>I'd love any help on this and would be very grateful.</p>