--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/eric7/Documentation/Source/eric7.Plugins.UiExtensionPlugins.Translator.TranslatorEngines.MyMemoryEngine.html Thu Jul 07 11:23:56 2022 +0200 @@ -0,0 +1,177 @@ +<!DOCTYPE html> +<html><head> +<title>eric7.Plugins.UiExtensionPlugins.Translator.TranslatorEngines.MyMemoryEngine</title> +<meta charset="UTF-8"> +<link rel="stylesheet" href="styles.css"> +</head> +<body> +<a NAME="top" ID="top"></a> +<h1>eric7.Plugins.UiExtensionPlugins.Translator.TranslatorEngines.MyMemoryEngine</h1> + +<p> +Module implementing the MyMemory translation engine. +</p> +<h3>Global Attributes</h3> + +<table> +<tr><td>None</td></tr> +</table> +<h3>Classes</h3> + +<table> + +<tr> +<td><a href="#MyMemoryEngine">MyMemoryEngine</a></td> +<td>Class implementing the translation engine for the MyMemory translation service.</td> +</tr> +</table> +<h3>Functions</h3> + +<table> +<tr><td>None</td></tr> +</table> +<hr /> +<hr /> +<a NAME="MyMemoryEngine" ID="MyMemoryEngine"></a> +<h2>MyMemoryEngine</h2> + +<p> + Class implementing the translation engine for the MyMemory + translation service. +</p> +<h3>Derived from</h3> +TranslationEngine +<h3>Class Attributes</h3> + +<table> +<tr><td>TranslatorLimit</td></tr><tr><td>TranslatorUrl</td></tr> +</table> +<h3>Class Methods</h3> + +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> + +<table> + +<tr> +<td><a href="#MyMemoryEngine.__init__">MyMemoryEngine</a></td> +<td>Constructor</td> +</tr> +<tr> +<td><a href="#MyMemoryEngine.engineName">engineName</a></td> +<td>Public method to return the name of the engine.</td> +</tr> +<tr> +<td><a href="#MyMemoryEngine.getTranslation">getTranslation</a></td> +<td>Public method to translate the given text.</td> +</tr> +<tr> +<td><a href="#MyMemoryEngine.supportedLanguages">supportedLanguages</a></td> +<td>Public method to get the supported languages.</td> +</tr> +</table> +<h3>Static Methods</h3> + +<table> +<tr><td>None</td></tr> +</table> + +<a NAME="MyMemoryEngine.__init__" ID="MyMemoryEngine.__init__"></a> +<h4>MyMemoryEngine (Constructor)</h4> +<b>MyMemoryEngine</b>(<i>plugin, parent=None</i>) + +<p> + Constructor +</p> +<dl> + +<dt><i>plugin</i> (TranslatorPlugin)</dt> +<dd> +reference to the plugin object +</dd> +<dt><i>parent</i> (QObject)</dt> +<dd> +reference to the parent object +</dd> +</dl> +<a NAME="MyMemoryEngine.engineName" ID="MyMemoryEngine.engineName"></a> +<h4>MyMemoryEngine.engineName</h4> +<b>engineName</b>(<i></i>) + +<p> + Public method to return the name of the engine. +</p> +<dl> +<dt>Return:</dt> +<dd> +engine name +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +str +</dd> +</dl> +<a NAME="MyMemoryEngine.getTranslation" ID="MyMemoryEngine.getTranslation"></a> +<h4>MyMemoryEngine.getTranslation</h4> +<b>getTranslation</b>(<i>requestObject, text, originalLanguage, translationLanguage</i>) + +<p> + Public method to translate the given text. +</p> +<dl> + +<dt><i>requestObject</i> (TranslatorRequest)</dt> +<dd> +reference to the request object +</dd> +<dt><i>text</i> (str)</dt> +<dd> +text to be translated +</dd> +<dt><i>originalLanguage</i> (str)</dt> +<dd> +language code of the original +</dd> +<dt><i>translationLanguage</i> (str)</dt> +<dd> +language code of the translation +</dd> +</dl> +<dl> +<dt>Return:</dt> +<dd> +tuple of translated text and flag indicating success +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +tuple of (str, bool) +</dd> +</dl> +<a NAME="MyMemoryEngine.supportedLanguages" ID="MyMemoryEngine.supportedLanguages"></a> +<h4>MyMemoryEngine.supportedLanguages</h4> +<b>supportedLanguages</b>(<i></i>) + +<p> + Public method to get the supported languages. +</p> +<dl> +<dt>Return:</dt> +<dd> +list of supported language codes +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +list of str +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> +</body></html> \ No newline at end of file