# Imports the Google Cloud client library
from google import translate

# Instantiates a client
translate_client = translate.Client()

# The text to translate
text = u'Hello, world!'

# The target language
target = 'th'

# Translates some text into Russian
translation = translate_client.translate(
    text,
    target_language=target)

print(u'Text: {}'.format(text))
print(u'Translation: {}'.format(translation['translatedText']))
