eric6.Plugins.UiExtensionPlugins.Translator.TranslatorEngines.DeepLEngine
Module implementing the DeepL translation engine.
Global Attributes
Classes
DeepLEngine |
Class implementing the translation engine for the DeepL translation service. |
Functions
DeepLEngine
Class implementing the translation engine for the DeepL
translation service.
Derived from
TranslationEngine
Class Attributes
MaxTranslationTextLen |
TranslatorUrl |
Class Methods
Methods
Static Methods
DeepLEngine (Constructor)
DeepLEngine(plugin, parent=None)
Constructor
- plugin (TranslatorPlugin)
-
reference to the plugin object
- parent (QObject)
-
reference to the parent object
DeepLEngine.engineName
engineName()
Public method to return the name of the engine.
- Returns:
-
engine name
- Return Type:
-
str
DeepLEngine.getTranslation
getTranslation(requestObject, text, originalLanguage, translationLanguage)
Public method to translate the given text.
- requestObject
-
reference to the request object
(TranslatorRequest)
- text
-
text to be translated (string)
- originalLanguage
-
language code of the original (string)
- translationLanguage
-
language code of the translation (string)
- Returns:
-
tuple of translated text (string) and flag indicating
success (boolean)
DeepLEngine.supportedLanguages
supportedLanguages()
Public method to get the supported languages.
- Returns:
-
list of supported language codes
- Return Type:
-
list of str