Skip to content

Instantly share code, notes, and snippets.

@mlouielu
Created April 30, 2018 05:10
Show Gist options
  • Save mlouielu/c4b313eb9a418828a297a297d0dd7057 to your computer and use it in GitHub Desktop.
Save mlouielu/c4b313eb9a418828a297a297d0dd7057 to your computer and use it in GitHub Desktop.
from googletrans import Translator
tr = Translator()
persons = ['I', 'You', 'He', 'We', 'They']
langs = ['fr', 'es', 'it', 'jp']
for person in persons:
print(f'=== Person: {person} ===')
for lang in langs:
result = tr.translate(f'{person} love', src='en', dest=lang)
print(f'{lang}: {result.text}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment