Skip to content

Instantly share code, notes, and snippets.

@DataSolveProblems
Created June 17, 2019 07:28
Show Gist options
  • Save DataSolveProblems/f6cf19e6e155aef1a6ecf231a3730df4 to your computer and use it in GitHub Desktop.
Save DataSolveProblems/f6cf19e6e155aef1a6ecf231a3730df4 to your computer and use it in GitHub Desktop.
import os
from google.cloud import translate
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = r"<CLIENT_SECRET.json>"
translate_client = translate.Client()
inputStrings = 'Sample Text''
result = translate_client.detect_language(inputStrings)
print(result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment