diff -r 0b38ab887b0d -r 28ab5f487f71 src/eric7/Plugins/UiExtensionPlugins/Translator/TranslatorEngines/GoogleV1Engine.py --- a/src/eric7/Plugins/UiExtensionPlugins/Translator/TranslatorEngines/GoogleV1Engine.py Wed Nov 09 08:53:26 2022 +0100 +++ b/src/eric7/Plugins/UiExtensionPlugins/Translator/TranslatorEngines/GoogleV1Engine.py Wed Nov 09 09:42:19 2022 +0100 @@ -233,3 +233,17 @@ + "?client=tw-ob&ie=utf-8&tl={0}&q={1}".format(language, text) ) return requestObject.get(url) + + +def createEngine(plugin, parent=None): + """ + Function to instantiate a translator engine object. + + @param plugin reference to the plugin object + @type TranslatorPlugin + @param parent reference to the parent object (defaults to None) + @type QObject (optional) + @return reference to the instantiated translator engine object + @rtype GoogleV1Engine + """ + return GoogleV1Engine(plugin, parent=parent)