class woob.capabilities.translate.CapTranslate

Bases: woob.capabilities.base.Capability

Capability of online translation website to translate word or sentence

translate(source_language, destination_language, request)

Perfom a translation.

  • 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


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

Bases: woob.capabilities.base.UserError

Raised when the language is not supported

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

Bases: woob.capabilities.base.UserError

Raised when no translation matches the given request