|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.Plugins.UiExtensionPlugins.Translator.TranslatorEngines.MyMemoryEngine</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> |
|
22 <a NAME="top" ID="top"></a> |
|
23 <h1>eric7.Plugins.UiExtensionPlugins.Translator.TranslatorEngines.MyMemoryEngine</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing the MyMemory translation engine. |
|
27 </p> |
|
28 <h3>Global Attributes</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <h3>Classes</h3> |
|
34 |
|
35 <table> |
|
36 |
|
37 <tr> |
|
38 <td><a href="#MyMemoryEngine">MyMemoryEngine</a></td> |
|
39 <td>Class implementing the translation engine for the MyMemory translation service.</td> |
|
40 </tr> |
|
41 </table> |
|
42 <h3>Functions</h3> |
|
43 |
|
44 <table> |
|
45 <tr><td>None</td></tr> |
|
46 </table> |
|
47 <hr /> |
|
48 <hr /> |
|
49 <a NAME="MyMemoryEngine" ID="MyMemoryEngine"></a> |
|
50 <h2>MyMemoryEngine</h2> |
|
51 |
|
52 <p> |
|
53 Class implementing the translation engine for the MyMemory |
|
54 translation service. |
|
55 </p> |
|
56 <h3>Derived from</h3> |
|
57 TranslationEngine |
|
58 <h3>Class Attributes</h3> |
|
59 |
|
60 <table> |
|
61 <tr><td>TranslatorLimit</td></tr><tr><td>TranslatorUrl</td></tr> |
|
62 </table> |
|
63 <h3>Class Methods</h3> |
|
64 |
|
65 <table> |
|
66 <tr><td>None</td></tr> |
|
67 </table> |
|
68 <h3>Methods</h3> |
|
69 |
|
70 <table> |
|
71 |
|
72 <tr> |
|
73 <td><a href="#MyMemoryEngine.__init__">MyMemoryEngine</a></td> |
|
74 <td>Constructor</td> |
|
75 </tr> |
|
76 <tr> |
|
77 <td><a href="#MyMemoryEngine.engineName">engineName</a></td> |
|
78 <td>Public method to return the name of the engine.</td> |
|
79 </tr> |
|
80 <tr> |
|
81 <td><a href="#MyMemoryEngine.getTranslation">getTranslation</a></td> |
|
82 <td>Public method to translate the given text.</td> |
|
83 </tr> |
|
84 <tr> |
|
85 <td><a href="#MyMemoryEngine.supportedLanguages">supportedLanguages</a></td> |
|
86 <td>Public method to get the supported languages.</td> |
|
87 </tr> |
|
88 </table> |
|
89 <h3>Static Methods</h3> |
|
90 |
|
91 <table> |
|
92 <tr><td>None</td></tr> |
|
93 </table> |
|
94 |
|
95 <a NAME="MyMemoryEngine.__init__" ID="MyMemoryEngine.__init__"></a> |
|
96 <h4>MyMemoryEngine (Constructor)</h4> |
|
97 <b>MyMemoryEngine</b>(<i>plugin, parent=None</i>) |
|
98 |
|
99 <p> |
|
100 Constructor |
|
101 </p> |
|
102 <dl> |
|
103 |
|
104 <dt><i>plugin</i></dt> |
|
105 <dd> |
|
106 reference to the plugin object (TranslatorPlugin) |
|
107 </dd> |
|
108 <dt><i>parent</i></dt> |
|
109 <dd> |
|
110 reference to the parent object (QObject) |
|
111 </dd> |
|
112 </dl> |
|
113 <a NAME="MyMemoryEngine.engineName" ID="MyMemoryEngine.engineName"></a> |
|
114 <h4>MyMemoryEngine.engineName</h4> |
|
115 <b>engineName</b>(<i></i>) |
|
116 |
|
117 <p> |
|
118 Public method to return the name of the engine. |
|
119 </p> |
|
120 <dl> |
|
121 <dt>Return:</dt> |
|
122 <dd> |
|
123 engine name (string) |
|
124 </dd> |
|
125 </dl> |
|
126 <a NAME="MyMemoryEngine.getTranslation" ID="MyMemoryEngine.getTranslation"></a> |
|
127 <h4>MyMemoryEngine.getTranslation</h4> |
|
128 <b>getTranslation</b>(<i>requestObject, text, originalLanguage, translationLanguage</i>) |
|
129 |
|
130 <p> |
|
131 Public method to translate the given text. |
|
132 </p> |
|
133 <dl> |
|
134 |
|
135 <dt><i>requestObject</i></dt> |
|
136 <dd> |
|
137 reference to the request object |
|
138 (TranslatorRequest) |
|
139 </dd> |
|
140 <dt><i>text</i></dt> |
|
141 <dd> |
|
142 text to be translated (string) |
|
143 </dd> |
|
144 <dt><i>originalLanguage</i></dt> |
|
145 <dd> |
|
146 language code of the original (string) |
|
147 </dd> |
|
148 <dt><i>translationLanguage</i></dt> |
|
149 <dd> |
|
150 language code of the translation (string) |
|
151 </dd> |
|
152 </dl> |
|
153 <dl> |
|
154 <dt>Return:</dt> |
|
155 <dd> |
|
156 tuple of translated text (string) and flag indicating |
|
157 success (boolean) |
|
158 </dd> |
|
159 </dl> |
|
160 <a NAME="MyMemoryEngine.supportedLanguages" ID="MyMemoryEngine.supportedLanguages"></a> |
|
161 <h4>MyMemoryEngine.supportedLanguages</h4> |
|
162 <b>supportedLanguages</b>(<i></i>) |
|
163 |
|
164 <p> |
|
165 Public method to get the supported languages. |
|
166 </p> |
|
167 <dl> |
|
168 <dt>Return:</dt> |
|
169 <dd> |
|
170 list of supported language codes (list of string) |
|
171 </dd> |
|
172 </dl> |
|
173 <div align="right"><a href="#top">Up</a></div> |
|
174 <hr /> |
|
175 </body></html> |