Home ⌂Doc Index ◂Up ▴

eric6.Plugins.UiExtensionPlugins.Translator.TranslatorEngines.GlosbeEngine

Module implementing the Glosbe translation engine.

Global Attributes

None

Classes

GlosbeEngine Class implementing the translation engine for the Glosbe translation service.

Functions

None


GlosbeEngine

Class implementing the translation engine for the Glosbe translation service.

Derived from

TranslationEngine

Class Attributes

TranslatorLimit
TranslatorUrl

Class Methods

None

Methods

GlosbeEngine Constructor
engineName Public method to return the name of the engine.
getTranslation Public method to translate the given text.
supportedLanguages Public method to get the supported languages.

Static Methods

None

GlosbeEngine (Constructor)

GlosbeEngine(plugin, parent=None)

Constructor

plugin
reference to the plugin object (TranslatorPlugin)
parent
reference to the parent object (QObject)

GlosbeEngine.engineName

engineName()

Public method to return the name of the engine.

Returns:
engine name (string)

GlosbeEngine.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)

GlosbeEngine.supportedLanguages

supportedLanguages()

Public method to get the supported languages.

Returns:
list of supported language codes (list of string)
Up



Home ⌂Doc Index ◂Up ▴