weboob.capabilities.translate

exception weboob.capabilities.translate.TranslationFail(msg='No Translation Available')

Bases: weboob.capabilities.base.UserError

Raised when no translation matches the given request

exception weboob.capabilities.translate.LanguageNotSupported(msg='language is not supported')

Bases: weboob.capabilities.base.UserError

Raised when the language is not supported

class weboob.capabilities.translate.CapTranslate

Bases: weboob.capabilities.base.Capability

Capability of online translation website to translate word or sentence

translate(source_language, destination_language, request)

Perfom a translation.

Parameters:
  • source_language – language in which the request is written
  • destination_language – language to translate the request into
  • request – the sentence to be translated
Return type:

Translation