Created
April 30, 2018 05:10
-
-
Save mlouielu/c4b313eb9a418828a297a297d0dd7057 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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