CloudTranslation’s Online Multilingual Machine Translation API
中文版 | English Version
Version 1.0 (Last Updated: 2019-02-24)
Contents
Service Address
- CERNET:
https://nmt.xmu.edu.cn/nmt
- ChinaTelecom/ChinaMobile/ChinaUnicom:
http://sz-nmt-1.cloudtranslation.com/nmt
Communication Protocol & Request Methods
Example
- Request:
https://nmt.xmu.edu.cn/nmt?lang=en_zh-cn&src=Neural%20Machine%20Translation
- Response: 神经机器翻译
Request Parameters
Parameter Name |
Type |
Required/Optional |
Description |
lang |
enumerate |
Required |
Translation direction, formatted as SourceLanguageCode_TargetLanguageCode . Currently, 16 source languages and 14 target languages are supported. See Annex I for details. |
src |
string |
Required |
Source text, UTF-8 encoded and URL escaped |
Doc Translation Example
- Request:
https://nmt.xmu.edu.cn/nmtdoc
- Response: Translated file in format xliff or txt
Doc Request Parameters
Parameter Name |
Type |
Required/Optional |
Description |
lang |
enumerate |
Required |
Translation direction, formatted as SourceLanguageCode_TargetLanguageCode . Currently, 16 source languages and 14 target languages are supported. See Annex I for details. |
doc |
File |
Required |
The uploaded files format should be in Supported File Format . Please upload files in {Content Type: multipart/form data} when requesting |
- "docx", "xlsx", "pptx", "doc", "xls", "ppt", "pdf", "html", "csv", "xml", "txt", "idml", "xliff", "sdlxliff"
Response Message
- Success: UTF-8 encoded translation
- Exception: When an server error occurs, the response message starts with
[ERR]
and contains the error message.
Annex I Supported Language Codes
Source Language |
Code |
|
Target Language |
Code |
Simplified Chinese |
zh-cn |
|
Simplified Chinese |
zh-cn |
Traditional Chinese |
zh-tw |
|
Traditional Chinese |
zh-tw |
English |
en |
|
English |
en |
Deutsch |
de |
|
Deutsch |
de |
French |
fr |
|
French |
fr |
Spanish |
es |
|
Spanish |
es |
Portuguese |
pt |
|
Portuguese |
pt |
Italian |
it |
|
Italian |
it |
Russian |
ru |
|
Russian |
ru |
Japanese |
ja |
|
Japanese |
ja |
Indonesian |
id |
|
Indonesian |
id |
Malaysian |
ms |
|
Malaysian |
ms |
Vietnamese |
vi |
|
|
|
Tibetan |
bo |
|
Tibetan |
bo |
Uyghur |
ug |
|
Uyghur |
ug |
Mongolian |
mn |
|
Mongolian |
mn |