Documentation/Source/eric6.Plugins.UiExtensionPlugins.Translator.TranslatorEngines.GoogleV1Engine.html

changeset 6018
1c858879d3d0
equal deleted inserted replaced
6017:dab01678626d 6018:1c858879d3d0
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.Plugins.UiExtensionPlugins.Translator.TranslatorEngines.GoogleV1Engine</title>
4 <meta charset="UTF-8">
5 <style>
6 body {
7 background: #EDECE6;
8 margin: 0em 1em 10em 1em;
9 color: black;
10 }
11
12 h1 { color: white; background: #85774A; }
13 h2 { color: white; background: #85774A; }
14 h3 { color: white; background: #9D936E; }
15 h4 { color: white; background: #9D936E; }
16
17 a { color: #BA6D36; }
18
19 </style>
20 </head>
21 <body><a NAME="top" ID="top"></a>
22 <h1>eric6.Plugins.UiExtensionPlugins.Translator.TranslatorEngines.GoogleV1Engine</h1>
23 <p>
24 Module implementing the Google V1 translation engine.
25 </p>
26 <h3>Global Attributes</h3>
27 <table>
28 <tr><td>None</td></tr>
29 </table>
30 <h3>Classes</h3>
31 <table>
32 <tr>
33 <td><a href="#GoogleV1Engine">GoogleV1Engine</a></td>
34 <td>Class implementing the translation engine for the old Google translation service.</td>
35 </tr>
36 </table>
37 <h3>Functions</h3>
38 <table>
39 <tr><td>None</td></tr>
40 </table>
41 <hr /><hr />
42 <a NAME="GoogleV1Engine" ID="GoogleV1Engine"></a>
43 <h2>GoogleV1Engine</h2>
44 <p>
45 Class implementing the translation engine for the old Google
46 translation service.
47 </p>
48 <h3>Derived from</h3>
49 TranslationEngine
50 <h3>Class Attributes</h3>
51 <table>
52 <tr><td>TextToSpeechLimit</td></tr><tr><td>TextToSpeechUrl</td></tr><tr><td>TranslatorUrl</td></tr>
53 </table>
54 <h3>Class Methods</h3>
55 <table>
56 <tr><td>None</td></tr>
57 </table>
58 <h3>Methods</h3>
59 <table>
60 <tr>
61 <td><a href="#GoogleV1Engine.__init__">GoogleV1Engine</a></td>
62 <td>Constructor</td>
63 </tr><tr>
64 <td><a href="#GoogleV1Engine.engineName">engineName</a></td>
65 <td>Public method to return the name of the engine.</td>
66 </tr><tr>
67 <td><a href="#GoogleV1Engine.getTextToSpeechData">getTextToSpeechData</a></td>
68 <td>Public method to pronounce the given text.</td>
69 </tr><tr>
70 <td><a href="#GoogleV1Engine.getTranslation">getTranslation</a></td>
71 <td>Public method to translate the given text.</td>
72 </tr><tr>
73 <td><a href="#GoogleV1Engine.hasTTS">hasTTS</a></td>
74 <td>Public method indicating the Text-to-Speech capability.</td>
75 </tr><tr>
76 <td><a href="#GoogleV1Engine.supportedLanguages">supportedLanguages</a></td>
77 <td>Public method to get the supported languages.</td>
78 </tr>
79 </table>
80 <h3>Static Methods</h3>
81 <table>
82 <tr><td>None</td></tr>
83 </table>
84 <a NAME="GoogleV1Engine.__init__" ID="GoogleV1Engine.__init__"></a>
85 <h4>GoogleV1Engine (Constructor)</h4>
86 <b>GoogleV1Engine</b>(<i>plugin, parent=None</i>)
87 <p>
88 Constructor
89 </p><dl>
90 <dt><i>plugin</i></dt>
91 <dd>
92 reference to the plugin object (TranslatorPlugin)
93 </dd><dt><i>parent</i></dt>
94 <dd>
95 reference to the parent object (QObject)
96 </dd>
97 </dl><a NAME="GoogleV1Engine.engineName" ID="GoogleV1Engine.engineName"></a>
98 <h4>GoogleV1Engine.engineName</h4>
99 <b>engineName</b>(<i></i>)
100 <p>
101 Public method to return the name of the engine.
102 </p><dl>
103 <dt>Returns:</dt>
104 <dd>
105 engine name (string)
106 </dd>
107 </dl><a NAME="GoogleV1Engine.getTextToSpeechData" ID="GoogleV1Engine.getTextToSpeechData"></a>
108 <h4>GoogleV1Engine.getTextToSpeechData</h4>
109 <b>getTextToSpeechData</b>(<i>requestObject, text, language</i>)
110 <p>
111 Public method to pronounce the given text.
112 </p><dl>
113 <dt><i>requestObject</i></dt>
114 <dd>
115 reference to the request object
116 (TranslatorRequest)
117 </dd><dt><i>text</i></dt>
118 <dd>
119 text to be pronounced (string)
120 </dd><dt><i>language</i></dt>
121 <dd>
122 language code of the text (string)
123 </dd>
124 </dl><dl>
125 <dt>Returns:</dt>
126 <dd>
127 tuple with pronounce data (QByteArray) or error string (string)
128 and success flag (boolean)
129 </dd>
130 </dl><a NAME="GoogleV1Engine.getTranslation" ID="GoogleV1Engine.getTranslation"></a>
131 <h4>GoogleV1Engine.getTranslation</h4>
132 <b>getTranslation</b>(<i>requestObject, text, originalLanguage, translationLanguage</i>)
133 <p>
134 Public method to translate the given text.
135 </p><dl>
136 <dt><i>requestObject</i></dt>
137 <dd>
138 reference to the request object
139 (TranslatorRequest)
140 </dd><dt><i>text</i></dt>
141 <dd>
142 text to be translated (string)
143 </dd><dt><i>originalLanguage</i></dt>
144 <dd>
145 language code of the original (string)
146 </dd><dt><i>translationLanguage</i></dt>
147 <dd>
148 language code of the translation (string)
149 </dd>
150 </dl><dl>
151 <dt>Returns:</dt>
152 <dd>
153 tuple of translated text (string) and flag indicating
154 success (boolean)
155 </dd>
156 </dl><a NAME="GoogleV1Engine.hasTTS" ID="GoogleV1Engine.hasTTS"></a>
157 <h4>GoogleV1Engine.hasTTS</h4>
158 <b>hasTTS</b>(<i></i>)
159 <p>
160 Public method indicating the Text-to-Speech capability.
161 </p><dl>
162 <dt>Returns:</dt>
163 <dd>
164 flag indicating the Text-to-Speech capability (boolean)
165 </dd>
166 </dl><a NAME="GoogleV1Engine.supportedLanguages" ID="GoogleV1Engine.supportedLanguages"></a>
167 <h4>GoogleV1Engine.supportedLanguages</h4>
168 <b>supportedLanguages</b>(<i></i>)
169 <p>
170 Public method to get the supported languages.
171 </p><dl>
172 <dt>Returns:</dt>
173 <dd>
174 list of supported language codes (list of string)
175 </dd>
176 </dl>
177 <div align="right"><a href="#top">Up</a></div>
178 <hr />
179 </body></html>

eric ide

mercurial