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