Contextual Product Translation API Reference
Contextual Product Translation
GET/POST
/ai/text/translation/and/polishment
Contextual product translation is specifically developed for e-commerce scenarios, enabling precise translation across more than 60 languages. It leverages e-commerce-specific data for training to enhance translation quality and is equipped with intelligent brand recognition and customizable intervention features, providing an efficient multi-language market expansion solution for e-commerce platforms and developers.
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
| String[] | Ture | Translation text;The total character length should not more than 1000, and the list is recommended to have no more than 50 items. We also provide bulk APIs that support the offline translation of large quantities of product text. Please contact us if needed.
|
| String | True | Source language code;Use ISO 693-1 Language Code Specification,such as the code of“英文” is “en”,Chinese is “zh”。Supporting languages are as follows. Currently automatic language detection ability is not available.
|
| String | True | Target language code;Use ISO 693-1 Language Code Specification; Please select from the supporting source languages listed below. The available target languages can be found in the following supporting languages list.
|
| String | true | The format type of source text;Currently text/html are avaliable.
|
| String | False | Intervention glossary ID. The intervention glossary needs to be created separately, and its ID should be provided in the input parameters. Multiple intervention glossaries can be passed. If the provided intervention glossary ID is empty, the translation results will not be modified. Currently, self-service uploading of intervention glossaries is not supported. Please contact us if needed.
|
| Object | False | Translate_scene(String) ,Currently, translate_scene(String) supports translation scenarios for product descriptions and CPV attributes (description)/product titles (title)/product Q&A and replies (qa)/product reviews (review).
|
Sample Request
Parameter Response
Parameter | Type | Description |
---|---|---|
| Number | Response code; 200 indicates a successful call, other response codes can be referred to in the error code information. |
| Object | Result data that generated. |
| Number | The number of the strings. |
| String[] | Result data that translated. |
| String | Request ID: Used to uniquely identify a single request call. |
| Boolean | Whether successful;true is successful,false is unsuccessful. |
| String | Error message,like "content has sensitive data, please try other input". |
Sample Response
Error Code
code | Error code | Description |
---|---|---|
500 | system error | System error |
501 | rate limit exceed | The current interface has reached the current limit. Please contact us to increase the current limit value. |
700 | invalid input | The format of the input parameters does not meet the requirements, and resMessage will return detailed fields that do not meet the requirements. |
801 | model failed | Internal call exception, please contact us for troubleshooting. |
1000 | content has sensitive data, please try other input | The request parameters contain sensitive information and cannot be processed at this time. Please try a different input. |
1001 | content control failed, please retry | The risk control service failed. Please try again. If the error persists, please contact us. |
1002 | content risk filter failed, please contact us | Content risk filter failed, please contact us |
1007 | text language is not supported | Text language is not supported,please input correst language. |
1100 | The input text length is too long | The input text length is too long(MAX is 4096 Token),please input again with correct length. |
Appendix
Supporting Languages and Scenarios
You can choose the supported language based on different types of product text content. More language are continuously being added. Please contact us if you have any specific requirements.
Source Language | Target Language | Description | Title | QA | Review |
---|---|---|---|---|---|
Chinese | English | Supported | |||
Arabic | English | Supported | |||
Japanese | English | Supported | |||
Korean | English | Supported | |||
German | English | Supported | |||
Dutch | English | Supported | |||
English | Chinese | Supported | |||
English | Arabic | Supported | Supported | ||
English | Urdu | Supported | Supported | ||
English | Bengali | Supported | Supported | ||
English | Polish | Supported | Supported | ||
English | Ukrainian | Supported | Supported | ||
English | Russian | Supported | Supported | ||
English | German | Supported | Supported | ||
English | Dutch | Supported | Supported | ||
English | Turkish | Supported | Supported | ||
English | Korean | Supported | |||
English | Japanese | Supported | |||
English | Thai | Supported | |||
English | Indonesian | Supported | |||
English | Malay | Supported | |||
English | Vietnamese | Supported | Supported | ||
English | Hebrew | Supported | Supported | ||
Chinese | Vietnamese | Supported | |||
English | Spanish | Supported | |||
English | French | Supported | |||
English | Portuguese | Supported | |||
English | Italian | Supported | |||
Turkish | Arabic | Supported | Supported | ||
Turkish | English | Supported | Supported | ||
Turkish | German | Supported | Supported | ||
Turkish | Czech | Supported | |||
Turkish | Romanian | Supported | |||
Turkish | Hungarian | Supported | |||
Turkish | Greek | Supported | |||
Chinese | Arabic | Supported | Supported | ||
Chinese | Urdu | Supported | Supported | ||
Chinese | Bengali | Supported | Supported | ||
Chinese | Polish | Supported | Supported | ||
Chinese | Ukrainian | Supported | Supported | ||
Chinese | Russian | Supported | Supported | ||
Chinese | German | Supported | Supported | ||
Chinese | Dutch | Supported | Supported | ||
Chinese | Turkish | Supported | Supported | ||
Chinese | Korean | Supported | |||
Chinese | Japanese | Supported | |||
Chinese | Thai | Supported | |||
Chinese | Indonesian | Supported | |||
Chinese | Malay | Supported | |||
Chinese | Vietnamese | Supported | |||
Chinese | Spanish | Supported | |||
Chinese | French | Supported | |||
Chinese | Portuguese | Supported | |||
Chinese | Italian | Supported |
Language Code
Contextual product translation supports translation between the languages listed in the table below. The language codes use ISO 639-1 two-letter codes. For country/region variants of languages, the table follows the RFC 5646 format, which adds an underline and then the ISO 3166 two-letter country/region code. For example, the language code for Traditional Chinese is zh-tw
.
Language English Name | Language Code |
---|---|
Arabic | ar |
Chinese (Simplified) | zh |
Chinese (Traditional) | zh-tw |
Danish | da |
Dutch | nl |
English | en |
Persian | fa |
Filipino/Tagalog | tl |
Finnish | fi |
French | fr |
German | de |
Hungarian | hu |
Icelandic | is |
Indonesian | id |
Italian | it |
Japanese | ja |
Korean | ko |
Lithuanian | lt |
Malay | ms |
Polish | pl |
Portuguese (Portugal) | pt |
Romanian | ro |
Russian | ru |
Sinhala | si |
Spanish | es |
Thai | th |
Turkish | tr |
Ukrainian | uk |
Urdu | ur |
Uzbek | uz |
Vietnamese | vi |
Last updated