KartikTalwar / Duolingo

Unofficial Duolingo API Written in Python
MIT License
822 stars 129 forks source link

How to use this for translation from English to Portuguese ? #48

Closed rajeshmahajan closed 7 years ago

rajeshmahajan commented 7 years ago

I am trying to see, if this can be used to translate an english text to another language.

lingo.get_translations(['hello', 'welcome'], source='en', target='pt') {u'welcome': [], u'hello': []}

I would expect a response like

{u'hello':[Olá], u'welcome':[bem-vindo]}

Is there anything I need to do ? Sorry, if I misunderstood the API capabilities...

rajeshmahajan commented 7 years ago

if I do, I get a different result.

lingo.get_translations(['hello', 'welcome'], source='pt', target='en') {u'welcome': [u'bem-vindo', u'bem-vindos', u'dar as boas vindas a', u'acolher', u'acolhimento', u'bem-vinda', u'bem-vindas', u'receber'], u'hello': [u'ol\xe1', u'oi', u'al\xf4']}