src/eric7/Documentation/Source/eric7.Plugins.UiExtensionPlugins.Translator.TranslatorEngines.GoogleV1Engine.html

branch
eric7
changeset 9209
b99e7fd55fd3
parent 8596
d64760b2da50
child 9503
ae9232bf4854
equal deleted inserted replaced
9208:3fc8dfeb6ebe 9209:b99e7fd55fd3
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.Plugins.UiExtensionPlugins.Translator.TranslatorEngines.GoogleV1Engine</title>
4 <meta charset="UTF-8">
5 <link rel="stylesheet" href="styles.css">
6 </head>
7 <body>
8 <a NAME="top" ID="top"></a>
9 <h1>eric7.Plugins.UiExtensionPlugins.Translator.TranslatorEngines.GoogleV1Engine</h1>
10
11 <p>
12 Module implementing the Google V1 translation engine.
13 </p>
14 <h3>Global Attributes</h3>
15
16 <table>
17 <tr><td>None</td></tr>
18 </table>
19 <h3>Classes</h3>
20
21 <table>
22
23 <tr>
24 <td><a href="#GoogleV1Engine">GoogleV1Engine</a></td>
25 <td>Class implementing the translation engine for the old Google translation service.</td>
26 </tr>
27 </table>
28 <h3>Functions</h3>
29
30 <table>
31 <tr><td>None</td></tr>
32 </table>
33 <hr />
34 <hr />
35 <a NAME="GoogleV1Engine" ID="GoogleV1Engine"></a>
36 <h2>GoogleV1Engine</h2>
37
38 <p>
39 Class implementing the translation engine for the old Google
40 translation service.
41 </p>
42 <h3>Derived from</h3>
43 TranslationEngine
44 <h3>Class Attributes</h3>
45
46 <table>
47 <tr><td>TextToSpeechLimit</td></tr><tr><td>TextToSpeechUrl</td></tr><tr><td>TranslatorUrl</td></tr>
48 </table>
49 <h3>Class Methods</h3>
50
51 <table>
52 <tr><td>None</td></tr>
53 </table>
54 <h3>Methods</h3>
55
56 <table>
57
58 <tr>
59 <td><a href="#GoogleV1Engine.__init__">GoogleV1Engine</a></td>
60 <td>Constructor</td>
61 </tr>
62 <tr>
63 <td><a href="#GoogleV1Engine.engineName">engineName</a></td>
64 <td>Public method to return the name of the engine.</td>
65 </tr>
66 <tr>
67 <td><a href="#GoogleV1Engine.getTextToSpeechData">getTextToSpeechData</a></td>
68 <td>Public method to pronounce the given text.</td>
69 </tr>
70 <tr>
71 <td><a href="#GoogleV1Engine.getTranslation">getTranslation</a></td>
72 <td>Public method to translate the given text.</td>
73 </tr>
74 <tr>
75 <td><a href="#GoogleV1Engine.hasTTS">hasTTS</a></td>
76 <td>Public method indicating the Text-to-Speech capability.</td>
77 </tr>
78 <tr>
79 <td><a href="#GoogleV1Engine.supportedLanguages">supportedLanguages</a></td>
80 <td>Public method to get the supported languages.</td>
81 </tr>
82 </table>
83 <h3>Static Methods</h3>
84
85 <table>
86 <tr><td>None</td></tr>
87 </table>
88
89 <a NAME="GoogleV1Engine.__init__" ID="GoogleV1Engine.__init__"></a>
90 <h4>GoogleV1Engine (Constructor)</h4>
91 <b>GoogleV1Engine</b>(<i>plugin, parent=None</i>)
92
93 <p>
94 Constructor
95 </p>
96 <dl>
97
98 <dt><i>plugin</i> (TranslatorPlugin)</dt>
99 <dd>
100 reference to the plugin object
101 </dd>
102 <dt><i>parent</i> (QObject)</dt>
103 <dd>
104 reference to the parent object
105 </dd>
106 </dl>
107 <a NAME="GoogleV1Engine.engineName" ID="GoogleV1Engine.engineName"></a>
108 <h4>GoogleV1Engine.engineName</h4>
109 <b>engineName</b>(<i></i>)
110
111 <p>
112 Public method to return the name of the engine.
113 </p>
114 <dl>
115 <dt>Return:</dt>
116 <dd>
117 engine name
118 </dd>
119 </dl>
120 <dl>
121 <dt>Return Type:</dt>
122 <dd>
123 str
124 </dd>
125 </dl>
126 <a NAME="GoogleV1Engine.getTextToSpeechData" ID="GoogleV1Engine.getTextToSpeechData"></a>
127 <h4>GoogleV1Engine.getTextToSpeechData</h4>
128 <b>getTextToSpeechData</b>(<i>requestObject, text, language</i>)
129
130 <p>
131 Public method to pronounce the given text.
132 </p>
133 <dl>
134
135 <dt><i>requestObject</i> (TranslatorRequest)</dt>
136 <dd>
137 reference to the request object
138 </dd>
139 <dt><i>text</i> (str)</dt>
140 <dd>
141 text to be pronounced
142 </dd>
143 <dt><i>language</i> (str)</dt>
144 <dd>
145 language code of the text
146 </dd>
147 </dl>
148 <dl>
149 <dt>Return:</dt>
150 <dd>
151 tuple with pronounce data or error string and success flag
152 </dd>
153 </dl>
154 <dl>
155 <dt>Return Type:</dt>
156 <dd>
157 tuple of (QByteArray or str, bool)
158 </dd>
159 </dl>
160 <a NAME="GoogleV1Engine.getTranslation" ID="GoogleV1Engine.getTranslation"></a>
161 <h4>GoogleV1Engine.getTranslation</h4>
162 <b>getTranslation</b>(<i>requestObject, text, originalLanguage, translationLanguage</i>)
163
164 <p>
165 Public method to translate the given text.
166 </p>
167 <dl>
168
169 <dt><i>requestObject</i> (TranslatorRequest)</dt>
170 <dd>
171 reference to the request object
172 </dd>
173 <dt><i>text</i> (str)</dt>
174 <dd>
175 text to be translated
176 </dd>
177 <dt><i>originalLanguage</i> (str)</dt>
178 <dd>
179 language code of the original
180 </dd>
181 <dt><i>translationLanguage</i> (str)</dt>
182 <dd>
183 language code of the translation
184 </dd>
185 </dl>
186 <dl>
187 <dt>Return:</dt>
188 <dd>
189 tuple of translated text and flag indicating success
190 </dd>
191 </dl>
192 <dl>
193 <dt>Return Type:</dt>
194 <dd>
195 tuple of (str, bool)
196 </dd>
197 </dl>
198 <a NAME="GoogleV1Engine.hasTTS" ID="GoogleV1Engine.hasTTS"></a>
199 <h4>GoogleV1Engine.hasTTS</h4>
200 <b>hasTTS</b>(<i></i>)
201
202 <p>
203 Public method indicating the Text-to-Speech capability.
204 </p>
205 <dl>
206 <dt>Return:</dt>
207 <dd>
208 flag indicating the Text-to-Speech capability
209 </dd>
210 </dl>
211 <dl>
212 <dt>Return Type:</dt>
213 <dd>
214 bool
215 </dd>
216 </dl>
217 <a NAME="GoogleV1Engine.supportedLanguages" ID="GoogleV1Engine.supportedLanguages"></a>
218 <h4>GoogleV1Engine.supportedLanguages</h4>
219 <b>supportedLanguages</b>(<i></i>)
220
221 <p>
222 Public method to get the supported languages.
223 </p>
224 <dl>
225 <dt>Return:</dt>
226 <dd>
227 list of supported language codes
228 </dd>
229 </dl>
230 <dl>
231 <dt>Return Type:</dt>
232 <dd>
233 list of str
234 </dd>
235 </dl>
236 <div align="right"><a href="#top">Up</a></div>
237 <hr />
238 </body></html>

eric ide

mercurial