|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.Plugins.UiExtensionPlugins.Translator.TranslatorEngines.DeepLEngine</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.DeepLEngine</h1> |
|
23 <p> |
|
24 Module implementing the DeepL 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="#DeepLEngine">DeepLEngine</a></td> |
|
34 <td>Class implementing the translation engine for the DeepL 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="DeepLEngine" ID="DeepLEngine"></a> |
|
43 <h2>DeepLEngine</h2> |
|
44 <p> |
|
45 Class implementing the translation engine for the DeepL |
|
46 translation service. |
|
47 </p> |
|
48 <h3>Derived from</h3> |
|
49 TranslationEngine |
|
50 <h3>Class Attributes</h3> |
|
51 <table> |
|
52 <tr><td>MaxTranslationTextLen</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="#DeepLEngine.__init__">DeepLEngine</a></td> |
|
62 <td>Constructor</td> |
|
63 </tr><tr> |
|
64 <td><a href="#DeepLEngine.engineName">engineName</a></td> |
|
65 <td>Public method to return the name of the engine.</td> |
|
66 </tr><tr> |
|
67 <td><a href="#DeepLEngine.getTranslation">getTranslation</a></td> |
|
68 <td>Public method to translate the given text.</td> |
|
69 </tr><tr> |
|
70 <td><a href="#DeepLEngine.supportedLanguages">supportedLanguages</a></td> |
|
71 <td>Public method to get the supported languages.</td> |
|
72 </tr> |
|
73 </table> |
|
74 <h3>Static Methods</h3> |
|
75 <table> |
|
76 <tr><td>None</td></tr> |
|
77 </table> |
|
78 <a NAME="DeepLEngine.__init__" ID="DeepLEngine.__init__"></a> |
|
79 <h4>DeepLEngine (Constructor)</h4> |
|
80 <b>DeepLEngine</b>(<i>plugin, parent=None</i>) |
|
81 <p> |
|
82 Constructor |
|
83 </p><dl> |
|
84 <dt><i>plugin</i> (TranslatorPlugin)</dt> |
|
85 <dd> |
|
86 reference to the plugin object |
|
87 </dd><dt><i>parent</i> (QObject)</dt> |
|
88 <dd> |
|
89 reference to the parent object |
|
90 </dd> |
|
91 </dl><a NAME="DeepLEngine.engineName" ID="DeepLEngine.engineName"></a> |
|
92 <h4>DeepLEngine.engineName</h4> |
|
93 <b>engineName</b>(<i></i>) |
|
94 <p> |
|
95 Public method to return the name of the engine. |
|
96 </p><dl> |
|
97 <dt>Returns:</dt> |
|
98 <dd> |
|
99 engine name |
|
100 </dd> |
|
101 </dl><dl> |
|
102 <dt>Return Type:</dt> |
|
103 <dd> |
|
104 str |
|
105 </dd> |
|
106 </dl><a NAME="DeepLEngine.getTranslation" ID="DeepLEngine.getTranslation"></a> |
|
107 <h4>DeepLEngine.getTranslation</h4> |
|
108 <b>getTranslation</b>(<i>requestObject, text, originalLanguage, translationLanguage</i>) |
|
109 <p> |
|
110 Public method to translate the given text. |
|
111 </p><dl> |
|
112 <dt><i>requestObject</i></dt> |
|
113 <dd> |
|
114 reference to the request object |
|
115 (TranslatorRequest) |
|
116 </dd><dt><i>text</i></dt> |
|
117 <dd> |
|
118 text to be translated (string) |
|
119 </dd><dt><i>originalLanguage</i></dt> |
|
120 <dd> |
|
121 language code of the original (string) |
|
122 </dd><dt><i>translationLanguage</i></dt> |
|
123 <dd> |
|
124 language code of the translation (string) |
|
125 </dd> |
|
126 </dl><dl> |
|
127 <dt>Returns:</dt> |
|
128 <dd> |
|
129 tuple of translated text (string) and flag indicating |
|
130 success (boolean) |
|
131 </dd> |
|
132 </dl><a NAME="DeepLEngine.supportedLanguages" ID="DeepLEngine.supportedLanguages"></a> |
|
133 <h4>DeepLEngine.supportedLanguages</h4> |
|
134 <b>supportedLanguages</b>(<i></i>) |
|
135 <p> |
|
136 Public method to get the supported languages. |
|
137 </p><dl> |
|
138 <dt>Returns:</dt> |
|
139 <dd> |
|
140 list of supported language codes |
|
141 </dd> |
|
142 </dl><dl> |
|
143 <dt>Return Type:</dt> |
|
144 <dd> |
|
145 list of str |
|
146 </dd> |
|
147 </dl> |
|
148 <div align="right"><a href="#top">Up</a></div> |
|
149 <hr /> |
|
150 </body></html> |