术语表 API
创建术语表
/v1/glossary/create创建包含术语和翻译的新术语表。
示例
curl
1curl -X POST 'https://dltranslator.com/api/v1/glossary/create' \
2--header 'Authorization: [yourSecretKey]' \
3--header 'Content-Type: application/json' \
4--data '{
5 "name": "金融术语",
6 "targetLang": "English",
7 "keys": "[\"储蓄分流\"]",
8 "translated": "{'储蓄分流':'Diversion of household deposits'}"
9}'
请求参数
参数 | 类型 | 默认 | 描述 | 示例 |
---|---|---|---|---|
*name | String | - | 术语表名称 | 金融术语 |
desc | String | - | 术语表描述 | - |
*targetLang | String | - |
| English |
*keys | String[] | - | 源术语列表 | ["储蓄分流"] |
*translated | JSON | - | 术语到翻译的映射 | {'储蓄分流':'Diversion of household deposits'} |
响应
参数 | 类型 | 默认 | 描述 | 示例 |
---|---|---|---|---|
glossaryId | String | - | 术语表ID | - |