# eric7.Plugins.UiExtensionPlugins.Translator.TranslatorEngines.GoogleV2Engine

Module implementing the Google V2 translation engine.

### Global Attributes

None

### Classes

GoogleV2Engine | Class implementing the translation engine for the new Google translation service.

### Functions

None

## GoogleV2Engine

Class implementing the translation engine for the new Google translation service.

### Derived from

TranslationEngine

### Class Attributes

TranslatorUrl

### Class Methods

None

### Methods

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

#### GoogleV2Engine (Constructor)

GoogleV2Engine(plugin, parent=None)

Constructor

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

#### GoogleV2Engine.engineName

engineName()

Public method to return the name of the engine.

Return:
  engine name (string)

#### GoogleV2Engine.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)

Return:
  tuple of translated text (string) and flag indicating success (boolean)

#### GoogleV2Engine.supportedLanguages

supportedLanguages()

Public method to get the supported languages.

Return:
  list of supported language codes (list of string)

Up