3

From what I understand, GoogleTrans makes an Ajax call to the actual Google Translate. It's quite easy to set up and use. I am trying to translate English words into Spanish, but I see that the GoogleTrans module only returns a single translation even when there are multiple possible translations.

For instance. The word 'Lawyer' has two possible translations in Spanish viz, 'abogada' (feminine) and 'abogado' (masculine). However, the GoogleTrans only returns back 'abogado'.

How can I get both the translations?

enter image description here

from googletrans import Translator
translator = Translator()
translator.translate('lawyer', dest="es").text

>> 'abogado'

I am using this module for an offline task. Therefore, I am open to suggestions and workarounds if any.

Stevoisiak
  • 23,794
  • 27
  • 122
  • 225
Afsan Abdulali Gujarati
  • 1,375
  • 3
  • 18
  • 30
  • 2
    I removed the google-translation tag because that feature is only available on web. The library you are using doesn't seem to support the multiple translation feature for web so you may need to look for a new library or scrape the site yourself. – MyNameIsCaleb Oct 01 '19 at 15:10

0 Answers0