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

branch
eric7
changeset 10479
856476537696
parent 9503
ae9232bf4854
equal deleted inserted replaced
10478:de9106c55c3d 10479:856476537696
5 <link rel="stylesheet" href="styles.css"> 5 <link rel="stylesheet" href="styles.css">
6 </head> 6 </head>
7 <body> 7 <body>
8 <a NAME="top" ID="top"></a> 8 <a NAME="top" ID="top"></a>
9 <h1>eric7.Plugins.UiExtensionPlugins.Translator.TranslatorEngines.MicrosoftEngine</h1> 9 <h1>eric7.Plugins.UiExtensionPlugins.Translator.TranslatorEngines.MicrosoftEngine</h1>
10
11 <p> 10 <p>
12 Module implementing the Microsoft translation engine. 11 Module implementing the Microsoft translation engine.
13 </p> 12 </p>
13
14 <h3>Global Attributes</h3> 14 <h3>Global Attributes</h3>
15
16 <table> 15 <table>
17 <tr><td>None</td></tr> 16 <tr><td>None</td></tr>
18 </table> 17 </table>
18
19 <h3>Classes</h3> 19 <h3>Classes</h3>
20 20 <table>
21 <table>
22
23 <tr> 21 <tr>
24 <td><a href="#MicrosoftEngine">MicrosoftEngine</a></td> 22 <td><a href="#MicrosoftEngine">MicrosoftEngine</a></td>
25 <td>Class implementing the translation engine for the Microsoft translation service.</td> 23 <td>Class implementing the translation engine for the Microsoft translation service.</td>
26 </tr> 24 </tr>
27 </table> 25 </table>
26
28 <h3>Functions</h3> 27 <h3>Functions</h3>
29 28 <table>
30 <table>
31
32 <tr> 29 <tr>
33 <td><a href="#createEngine">createEngine</a></td> 30 <td><a href="#createEngine">createEngine</a></td>
34 <td>Function to instantiate a translator engine object.</td> 31 <td>Function to instantiate a translator engine object.</td>
35 </tr> 32 </tr>
36 </table> 33 </table>
34
37 <hr /> 35 <hr />
38 <hr /> 36 <hr />
39 <a NAME="MicrosoftEngine" ID="MicrosoftEngine"></a> 37 <a NAME="MicrosoftEngine" ID="MicrosoftEngine"></a>
40 <h2>MicrosoftEngine</h2> 38 <h2>MicrosoftEngine</h2>
41
42 <p> 39 <p>
43 Class implementing the translation engine for the Microsoft 40 Class implementing the translation engine for the Microsoft
44 translation service. 41 translation service.
45 </p> 42 </p>
43
46 <h3>Derived from</h3> 44 <h3>Derived from</h3>
47 TranslationEngine 45 TranslationEngine
48 <h3>Class Attributes</h3> 46 <h3>Class Attributes</h3>
49
50 <table> 47 <table>
51 <tr><td>TranslatorUrl</td></tr> 48 <tr><td>TranslatorUrl</td></tr>
52 </table> 49 </table>
50
53 <h3>Class Methods</h3> 51 <h3>Class Methods</h3>
54
55 <table> 52 <table>
56 <tr><td>None</td></tr> 53 <tr><td>None</td></tr>
57 </table> 54 </table>
55
58 <h3>Methods</h3> 56 <h3>Methods</h3>
59 57 <table>
60 <table>
61
62 <tr> 58 <tr>
63 <td><a href="#MicrosoftEngine.__init__">MicrosoftEngine</a></td> 59 <td><a href="#MicrosoftEngine.__init__">MicrosoftEngine</a></td>
64 <td>Constructor</td> 60 <td>Constructor</td>
65 </tr> 61 </tr>
66 <tr> 62 <tr>
82 <tr> 78 <tr>
83 <td><a href="#MicrosoftEngine.supportedLanguages">supportedLanguages</a></td> 79 <td><a href="#MicrosoftEngine.supportedLanguages">supportedLanguages</a></td>
84 <td>Public method to get the supported languages.</td> 80 <td>Public method to get the supported languages.</td>
85 </tr> 81 </tr>
86 </table> 82 </table>
83
87 <h3>Static Methods</h3> 84 <h3>Static Methods</h3>
88
89 <table> 85 <table>
90 <tr><td>None</td></tr> 86 <tr><td>None</td></tr>
91 </table> 87 </table>
88
92 89
93 <a NAME="MicrosoftEngine.__init__" ID="MicrosoftEngine.__init__"></a> 90 <a NAME="MicrosoftEngine.__init__" ID="MicrosoftEngine.__init__"></a>
94 <h4>MicrosoftEngine (Constructor)</h4> 91 <h4>MicrosoftEngine (Constructor)</h4>
95 <b>MicrosoftEngine</b>(<i>plugin, parent=None</i>) 92 <b>MicrosoftEngine</b>(<i>plugin, parent=None</i>)
96
97 <p> 93 <p>
98 Constructor 94 Constructor
99 </p> 95 </p>
96
100 <dl> 97 <dl>
101 98
102 <dt><i>plugin</i> (TranslatorPlugin)</dt> 99 <dt><i>plugin</i> (TranslatorPlugin)</dt>
103 <dd> 100 <dd>
104 reference to the plugin object 101 reference to the plugin object
109 </dd> 106 </dd>
110 </dl> 107 </dl>
111 <a NAME="MicrosoftEngine.__getClientDataAzure" ID="MicrosoftEngine.__getClientDataAzure"></a> 108 <a NAME="MicrosoftEngine.__getClientDataAzure" ID="MicrosoftEngine.__getClientDataAzure"></a>
112 <h4>MicrosoftEngine.__getClientDataAzure</h4> 109 <h4>MicrosoftEngine.__getClientDataAzure</h4>
113 <b>__getClientDataAzure</b>(<i></i>) 110 <b>__getClientDataAzure</b>(<i></i>)
114
115 <p> 111 <p>
116 Private method to retrieve the client data. 112 Private method to retrieve the client data.
117 </p> 113 </p>
114
118 <dl> 115 <dl>
119 <dt>Return:</dt> 116 <dt>Return:</dt>
120 <dd> 117 <dd>
121 tuple giving the API subscription key, the API subscription 118 tuple giving the API subscription key, the API subscription
122 region and a flag indicating validity 119 region and a flag indicating validity
129 </dd> 126 </dd>
130 </dl> 127 </dl>
131 <a NAME="MicrosoftEngine.__mapLanguageCode" ID="MicrosoftEngine.__mapLanguageCode"></a> 128 <a NAME="MicrosoftEngine.__mapLanguageCode" ID="MicrosoftEngine.__mapLanguageCode"></a>
132 <h4>MicrosoftEngine.__mapLanguageCode</h4> 129 <h4>MicrosoftEngine.__mapLanguageCode</h4>
133 <b>__mapLanguageCode</b>(<i>code</i>) 130 <b>__mapLanguageCode</b>(<i>code</i>)
134
135 <p> 131 <p>
136 Private method to map a language code to the Microsoft code. 132 Private method to map a language code to the Microsoft code.
137 </p> 133 </p>
134
138 <dl> 135 <dl>
139 136
140 <dt><i>code</i> (str)</dt> 137 <dt><i>code</i> (str)</dt>
141 <dd> 138 <dd>
142 language code 139 language code
155 </dd> 152 </dd>
156 </dl> 153 </dl>
157 <a NAME="MicrosoftEngine.engineName" ID="MicrosoftEngine.engineName"></a> 154 <a NAME="MicrosoftEngine.engineName" ID="MicrosoftEngine.engineName"></a>
158 <h4>MicrosoftEngine.engineName</h4> 155 <h4>MicrosoftEngine.engineName</h4>
159 <b>engineName</b>(<i></i>) 156 <b>engineName</b>(<i></i>)
160
161 <p> 157 <p>
162 Public method to return the name of the engine. 158 Public method to return the name of the engine.
163 </p> 159 </p>
160
164 <dl> 161 <dl>
165 <dt>Return:</dt> 162 <dt>Return:</dt>
166 <dd> 163 <dd>
167 engine name 164 engine name
168 </dd> 165 </dd>
174 </dd> 171 </dd>
175 </dl> 172 </dl>
176 <a NAME="MicrosoftEngine.getTranslation" ID="MicrosoftEngine.getTranslation"></a> 173 <a NAME="MicrosoftEngine.getTranslation" ID="MicrosoftEngine.getTranslation"></a>
177 <h4>MicrosoftEngine.getTranslation</h4> 174 <h4>MicrosoftEngine.getTranslation</h4>
178 <b>getTranslation</b>(<i>requestObject, text, originalLanguage, translationLanguage</i>) 175 <b>getTranslation</b>(<i>requestObject, text, originalLanguage, translationLanguage</i>)
179
180 <p> 176 <p>
181 Public method to translate the given text. 177 Public method to translate the given text.
182 </p> 178 </p>
179
183 <dl> 180 <dl>
184 181
185 <dt><i>requestObject</i> (TranslatorRequest)</dt> 182 <dt><i>requestObject</i> (TranslatorRequest)</dt>
186 <dd> 183 <dd>
187 reference to the request object 184 reference to the request object
212 </dd> 209 </dd>
213 </dl> 210 </dl>
214 <a NAME="MicrosoftEngine.supportedLanguages" ID="MicrosoftEngine.supportedLanguages"></a> 211 <a NAME="MicrosoftEngine.supportedLanguages" ID="MicrosoftEngine.supportedLanguages"></a>
215 <h4>MicrosoftEngine.supportedLanguages</h4> 212 <h4>MicrosoftEngine.supportedLanguages</h4>
216 <b>supportedLanguages</b>(<i></i>) 213 <b>supportedLanguages</b>(<i></i>)
217
218 <p> 214 <p>
219 Public method to get the supported languages. 215 Public method to get the supported languages.
220 </p> 216 </p>
217
221 <dl> 218 <dl>
222 <dt>Return:</dt> 219 <dt>Return:</dt>
223 <dd> 220 <dd>
224 list of supported language codes 221 list of supported language codes
225 </dd> 222 </dd>
234 <hr /> 231 <hr />
235 <hr /> 232 <hr />
236 <a NAME="createEngine" ID="createEngine"></a> 233 <a NAME="createEngine" ID="createEngine"></a>
237 <h2>createEngine</h2> 234 <h2>createEngine</h2>
238 <b>createEngine</b>(<i>plugin, parent=None</i>) 235 <b>createEngine</b>(<i>plugin, parent=None</i>)
239
240 <p> 236 <p>
241 Function to instantiate a translator engine object. 237 Function to instantiate a translator engine object.
242 </p> 238 </p>
239
243 <dl> 240 <dl>
244 241
245 <dt><i>plugin</i> (TranslatorPlugin)</dt> 242 <dt><i>plugin</i> (TranslatorPlugin)</dt>
246 <dd> 243 <dd>
247 reference to the plugin object 244 reference to the plugin object

eric ide

mercurial