Method: projects.detectLanguage

检测请求文本使用的语言。

HTTP 请求

POST https://{TRANSLATION_GDC_ENDPOINT}/v3/{parent}:detectLanguage

路径参数

参数
parent

string

必需。要拨打电话的项目。必须引用调用者的项目。

格式:projects/{project-id}

请求正文

请求正文中包含结构如下的数据:

JSON 表示法
{
  "mime_type": string,
    string: string,
    ...
  },
  "content": string
}
字段
mime_type

string

可选。源文本的格式,例如“text/html”“text/plain”。如果留空,MIME 类型将默认为“text/html”。

content

string

以字符串形式存储的输入内容。

响应正文

如果成功,则响应正文包含一个 DetectLanguageResponse 实例。