blob: 94bd234b131ceb1b242c3bb933dfacf6007e10d8 [file] [log] [blame]
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright 2010 Google Inc. All Rights Reserved.
"""Simple command-line example for Translate.
Command-line application that translates
some text.
"""
__author__ = '[email protected] (Joe Gregorio)'
from apiclient.discovery import build
import pprint
# Uncomment the next line to get very detailed logging
# httplib2.debuglevel = 4
def main():
service = build('translate', 'v2',
developerKey='AIzaSyDRRpR3GS1F1_jKNNM9HCNd2wJQyPG3oN0')
print service.translations().list(
source='en',
target='fr',
q=['flower', 'car']
).execute()
if __name__ == '__main__':
main()