POST new/translate/get

Request Information

URI Parameters

None.

Body Parameters

TranslateGetTextRequest
NameDescriptionTypeAdditional information
Text

待翻译文本。

string

None.

Outlanguage

目标语言。

string

None.

Request Formats

application/json, text/json

Sample:
{
  "Text": "sample string 1",
  "Outlanguage": "sample string 2"
}

application/xml, text/xml

Sample:
<TranslateGetTextRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ma.Api.Controllers.Dtos">
  <Outlanguage>sample string 2</Outlanguage>
  <Text>sample string 1</Text>
</TranslateGetTextRequest>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'TranslateGetTextRequest'.

Response Information

Resource Description

TranslateGetTextResponse
NameDescriptionTypeAdditional information
Ok

接口是否成功。

boolean

None.

Data

翻译结果文本。

string

None.

Msg

返回消息。

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Ok": true,
  "Data": "sample string 2",
  "Msg": "sample string 3"
}

application/xml, text/xml

Sample:
<TranslateGetTextResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ma.Api.Controllers.Dtos">
  <Data>sample string 2</Data>
  <Msg>sample string 3</Msg>
  <Ok>true</Ok>
</TranslateGetTextResponse>