exception TranslationFail(msg='No Translation Available')[source]

Bases: UserError

Raised when no translation matches the given request

exception LanguageNotSupported(msg='language is not supported')[source]

Bases: UserError

Raised when the language is not supported

class CapTranslate[source]

Bases: Capability

Capability of online translation website to translate word or sentence

translate(source_language, destination_language, request)[source]

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: