| John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 1 | <html><body> | 
 | 2 | <style> | 
 | 3 |  | 
 | 4 | body, h1, h2, h3, div, span, p, pre, a { | 
 | 5 |   margin: 0; | 
 | 6 |   padding: 0; | 
 | 7 |   border: 0; | 
 | 8 |   font-weight: inherit; | 
 | 9 |   font-style: inherit; | 
 | 10 |   font-size: 100%; | 
 | 11 |   font-family: inherit; | 
 | 12 |   vertical-align: baseline; | 
 | 13 | } | 
 | 14 |  | 
 | 15 | body { | 
 | 16 |   font-size: 13px; | 
 | 17 |   padding: 1em; | 
 | 18 | } | 
 | 19 |  | 
 | 20 | h1 { | 
 | 21 |   font-size: 26px; | 
 | 22 |   margin-bottom: 1em; | 
 | 23 | } | 
 | 24 |  | 
 | 25 | h2 { | 
 | 26 |   font-size: 24px; | 
 | 27 |   margin-bottom: 1em; | 
 | 28 | } | 
 | 29 |  | 
 | 30 | h3 { | 
 | 31 |   font-size: 20px; | 
 | 32 |   margin-bottom: 1em; | 
 | 33 |   margin-top: 1em; | 
 | 34 | } | 
 | 35 |  | 
 | 36 | pre, code { | 
 | 37 |   line-height: 1.5; | 
 | 38 |   font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; | 
 | 39 | } | 
 | 40 |  | 
 | 41 | pre { | 
 | 42 |   margin-top: 0.5em; | 
 | 43 | } | 
 | 44 |  | 
 | 45 | h1, h2, h3, p { | 
 | 46 |   font-family: Arial, sans serif; | 
 | 47 | } | 
 | 48 |  | 
 | 49 | h1, h2, h3 { | 
 | 50 |   border-bottom: solid #CCC 1px; | 
 | 51 | } | 
 | 52 |  | 
 | 53 | .toc_element { | 
 | 54 |   margin-top: 0.5em; | 
 | 55 | } | 
 | 56 |  | 
 | 57 | .firstline { | 
 | 58 |   margin-left: 2 em; | 
 | 59 | } | 
 | 60 |  | 
 | 61 | .method  { | 
 | 62 |   margin-top: 1em; | 
 | 63 |   border: solid 1px #CCC; | 
 | 64 |   padding: 1em; | 
 | 65 |   background: #EEE; | 
 | 66 | } | 
 | 67 |  | 
 | 68 | .details { | 
 | 69 |   font-weight: bold; | 
 | 70 |   font-size: 14px; | 
 | 71 | } | 
 | 72 |  | 
 | 73 | </style> | 
 | 74 |  | 
| Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 75 | <h1><a href="translate_v2.html">Google Cloud Translation API</a> . <a href="translate_v2.translations.html">translations</a></h1> | 
| John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 76 | <h2>Instance Methods</h2> | 
 | 77 | <p class="toc_element"> | 
| Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 78 |   <code><a href="#list">list(q, target, model=None, source=None, format=None, cid=None, x__xgafv=None)</a></code></p> | 
| Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 79 | <p class="firstline">Translates input text, returning translated text.</p> | 
 | 80 | <p class="toc_element"> | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 81 |   <code><a href="#translate">translate(body=None, x__xgafv=None)</a></code></p> | 
| Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 82 | <p class="firstline">Translates input text, returning translated text.</p> | 
| John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 83 | <h3>Method Details</h3> | 
 | 84 | <div class="method"> | 
| Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 85 |     <code class="details" id="list">list(q, target, model=None, source=None, format=None, cid=None, x__xgafv=None)</code> | 
| Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 86 |   <pre>Translates input text, returning translated text. | 
| John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 87 |  | 
 | 88 | Args: | 
| Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 89 |   q: string, The input text to translate. Repeat this parameter to perform translation | 
 | 90 | operations on multiple text inputs. (required) (repeated) | 
 | 91 |   target: string, The language to use for translation of the input text, set to one of the | 
 | 92 | language codes listed in Language Support. (required) | 
| Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 93 |   model: string, The `model` type requested for this translation. Valid values are | 
 | 94 | listed in public documentation. | 
| Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 95 |   source: string, The language of the source text, set to one of the language codes listed in | 
 | 96 | Language Support. If the source language is not specified, the API will | 
 | 97 | attempt to identify the source language automatically and return it within | 
 | 98 | the response. | 
 | 99 |   format: string, The format of the source text, in either HTML (default) or plain-text. A | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 100 | value of "html" indicates HTML and a value of "text" indicates plain-text. | 
| John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 101 |     Allowed values | 
 | 102 |       html - Specifies the input is in HTML | 
 | 103 |       text - Specifies the input is in plain textual format | 
| Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 104 |   cid: string, The customization id for translate (repeated) | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 105 |   x__xgafv: string, V1 error format. | 
 | 106 |     Allowed values | 
 | 107 |       1 - v1 error format | 
 | 108 |       2 - v2 error format | 
| John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 109 |  | 
 | 110 | Returns: | 
 | 111 |   An object of the form: | 
 | 112 |  | 
| Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 113 |     { # The main language translation response message. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 114 |     "translations": [ # Translations contains list of translation results of given text | 
| John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 115 |       { | 
| Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 116 |         "model": "A String", # The `model` type used for this translation. Valid values are | 
 | 117 |             # listed in public documentation. Can be different from requested `model`. | 
 | 118 |             # Present only if specific model type was explicitly requested. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 119 |         "detectedSourceLanguage": "A String", # The source language of the initial request, detected automatically, if | 
| Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 120 |             # no source language was passed within the initial request. If the | 
 | 121 |             # source language was passed, auto-detection of the language will not | 
 | 122 |             # occur and this field will be empty. | 
| Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 123 |         "translatedText": "A String", # Text translated into the target language. | 
| Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 124 |       }, | 
 | 125 |     ], | 
 | 126 |   }</pre> | 
 | 127 | </div> | 
 | 128 |  | 
 | 129 | <div class="method"> | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 130 |     <code class="details" id="translate">translate(body=None, x__xgafv=None)</code> | 
| Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 131 |   <pre>Translates input text, returning translated text. | 
 | 132 |  | 
 | 133 | Args: | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 134 |   body: object, The request body. | 
| Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 135 |     The object takes the form of: | 
 | 136 |  | 
 | 137 | { # The main translation request message for the Cloud Translation API. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 138 |     "target": "A String", # The language to use for translation of the input text, set to one of the | 
 | 139 |         # language codes listed in Language Support. | 
 | 140 |     "q": [ # The input text to translate. Repeat this parameter to perform translation | 
| Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 141 |         # operations on multiple text inputs. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 142 |       "A String", | 
| Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 143 |     ], | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 144 |     "source": "A String", # The language of the source text, set to one of the language codes listed in | 
| Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 145 |         # Language Support. If the source language is not specified, the API will | 
 | 146 |         # attempt to identify the source language automatically and return it within | 
 | 147 |         # the response. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 148 |     "model": "A String", # The `model` type requested for this translation. Valid values are | 
| Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 149 |         # listed in public documentation. | 
| Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 150 |     "format": "A String", # The format of the source text, in either HTML (default) or plain-text. A | 
 | 151 |         # value of "html" indicates HTML and a value of "text" indicates plain-text. | 
| Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 152 |   } | 
 | 153 |  | 
 | 154 |   x__xgafv: string, V1 error format. | 
 | 155 |     Allowed values | 
 | 156 |       1 - v1 error format | 
 | 157 |       2 - v2 error format | 
 | 158 |  | 
 | 159 | Returns: | 
 | 160 |   An object of the form: | 
 | 161 |  | 
 | 162 |     { # The main language translation response message. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 163 |     "translations": [ # Translations contains list of translation results of given text | 
| Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 164 |       { | 
| Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 165 |         "model": "A String", # The `model` type used for this translation. Valid values are | 
 | 166 |             # listed in public documentation. Can be different from requested `model`. | 
 | 167 |             # Present only if specific model type was explicitly requested. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 168 |         "detectedSourceLanguage": "A String", # The source language of the initial request, detected automatically, if | 
| Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 169 |             # no source language was passed within the initial request. If the | 
 | 170 |             # source language was passed, auto-detection of the language will not | 
 | 171 |             # occur and this field will be empty. | 
| Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 172 |         "translatedText": "A String", # Text translated into the target language. | 
| John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 173 |       }, | 
 | 174 |     ], | 
 | 175 |   }</pre> | 
 | 176 | </div> | 
 | 177 |  | 
 | 178 | </body></html> |