def translate_text(target, text):
 translate_client = translate.Client()
 result = translate_client.translate(text, target_language=target)
 print u'Text: {}'.format(result['input'])
 print u'Translation: {}'.format(result['translatedText'])
 print u'Detected source language: {}'.format(result['detectedSourceLanguage'])

def translate_text ( target , text ) : translate_client = translate . Client ( ) result = translate_client . translate ( text , target_language = target ) print u'Text: {}' . format ( result [ 'input' ] ) print u'Translation: {}' . format ( result [ 'translatedText' ] ) print u'Detected source language: {}' . format ( result [ 'detectedSourceLanguage' ] )
translates text into the target language .