# eric7.Plugins.UiExtensionPlugins.Translator.TranslatorEngines.YandexEngine

Module implementing the Yandex translation engine.

### Global Attributes

None

### Classes

YandexEngine | Class implementing the translation engine for the Yandex translation service.

### Functions

createEngine | Function to instantiate a translator engine object.

## YandexEngine

Class implementing the translation engine for the Yandex translation service.

### Derived from

TranslationEngine

### Class Attributes

TranslatorLimit
TranslatorUrl

### Class Methods

None

### Methods

YandexEngine | 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

#### YandexEngine (Constructor)

YandexEngine(plugin, parent=None)

Constructor

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

#### YandexEngine.engineName

engineName()

Public method to return the name of the engine.

Return:
  engine name

Return Type:
  str

#### YandexEngine.getTranslation

getTranslation(requestObject, text, originalLanguage, translationLanguage)

Public method to translate the given text.

requestObject (TranslatorRequest)
  reference to the request object
text (str)
  text to be translated
originalLanguage (str)
  language code of the original
translationLanguage (str)
  language code of the translation

Return:
  tuple of translated text and flag indicating success

Return Type:
  tuple of (str, bool)

#### YandexEngine.supportedLanguages

supportedLanguages()

Public method to get the supported languages.

Return:
  list of supported language codes

Return Type:
  list of str

Up

## createEngine

createEngine(plugin, parent=None)

Function to instantiate a translator engine object.

plugin (TranslatorPlugin)
  reference to the plugin object
parent (QObject (optional))
  reference to the parent object (defaults to None)

Return:
  reference to the instantiated translator engine object

Return Type:
  YandexEngine

Up