eric6.Plugins.UiExtensionPlugins.Translator.TranslatorEngines.MyMemoryEngine
Module implementing the MyMemory translation engine.
Global Attributes
Classes
MyMemoryEngine |
Class implementing the translation engine for the MyMemory translation service. |
Functions
MyMemoryEngine
Class implementing the translation engine for the MyMemory
translation service.
Derived from
TranslationEngine
Class Attributes
TranslatorLimit |
TranslatorUrl |
Class Methods
Methods
Static Methods
MyMemoryEngine (Constructor)
MyMemoryEngine(plugin, parent=None)
Constructor
- plugin
-
reference to the plugin object (TranslatorPlugin)
- parent
-
reference to the parent object (QObject)
MyMemoryEngine.engineName
engineName()
Public method to return the name of the engine.
- Returns:
-
engine name (string)
MyMemoryEngine.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)
MyMemoryEngine.supportedLanguages
supportedLanguages()
Public method to get the supported languages.
- Returns:
-
list of supported language codes (list of string)