Currently, Machine Translation provides automatic recognition and translation of Arabic, Russian, French, Portuguese, Thai, Turkish, Spanish, Vietnamese, Indonesian, English, and Chinese, with deep optimization of scenarios, such as commodity titles, commodity descriptions, commodity reviews, and seller-buyer communication.
- Title translation supports translation from English to Arabic, Russian, French, Portuguese, Thai, Turkish, Spanish, Vietnamese, Indonesian, and Chinese.
- Commodity description supports translation from English to Arabic, Russian, French, Portuguese, Thai, Turkish, Spanish, Vietnamese, Indonesian, and Chinese.
- Commodity review or seller-buyer communication supports translation from English to Arabic, Russian, French, Thai, Turkish, Spanish, Vietnamese, Indonesian, and Chinese.
Machine Translation provides high-quality translation between Chinese and English. It adopts Alibaba’s advanced neural network translation framework, and is applicable to daily communication, traveling abroad, and other scenarios. More languages will be added in the future.
- en English
- ru Russian
- fr French
- zh Simplified Chinese
- es Spanish
- pt Portuguese
- ar Arabic
- tr Turkish
- th Thai
- vi Vietnamese
- id Indonesian
|10001||The request has timed out.||Send the request again.|
|10002||The error message returned when a system error has occurred.||Send the request again.|
|10003||The error message returned when URL decoding fails.||Make sure that the string is encoded by using UTF-8 and URL encoding is correct.|
|10004||Parameters are missing.||Check input parameters.|
|10005||The error message returned when the language is not supported.||Make sure that both the source and target languages are supported.|
|10006||The error message returned when the system fails to recognize the string.||Make sure that the string you have passed in is correct.|
|10007||The error message returned when the translation fails.||Check whether the translated string is correct.|
|10008||The character length is too long.||Check the character length of the source text. The source text can be called multiple times. The length is limited to 5000 characters.|
|10009||The RAM user is not authorized.||Use the primary account to authorize the RAM user.|
|10010||The account does not activate the service.||Activate Machine Translation first.|
|10011||The RAM user encounters a service failure.||Contact Customer Support.|
|10012||The translation service cannot be called.||Contact Customer Support.|
|10013||The account does not activate the service or has overdue payment.||Activate the service or clear the overdue payment.|
|19999||An unknown error has occurred.||Contact Customer Support.|
Partial result customization is not supported for the moment. If part of the translation is incorrect, contact Customer Support to correct it.
The length of the text string for a single translation cannot exceed 2000, and is calculated by using String.length() <=2000 of Java.
Currently, only text translation is available. The APIs for voice translation and image translation will be provided in the future.
Contact Customer Support if you need custom translation services.
- Check whether the aliyun-java-sdk-core and aliyun-java-sdk-alimt versions are normal.
- Change the code writing.
DefaultProfile profile = DefaultProfile.getProfile(
"cn-hangzhou", // Region ID
accessKeyId, // AccessKey ID
accessKeySecret); // Access Key Secret
IAcsClient client = new DefaultAcsClient(profile);
//Create API requests and set parameters
TranslateECommerceRequest eCommerceRequest = new TranslateECommerceRequest();
eCommerceRequest.setMethod(MethodType.POST); // Set request method，POST
eCommerceRequest.setFormatType("text"); // format type
eCommerceRequest.setSourceLanguage("en"); //source language
eCommerceRequest.setSourceText("book"); //source text
eCommerceRequest.setTargetLanguage("zh"); //target language
DefaultProfile.addEndpoint("cn-hangzhou", "alimt", "mt.cn-hangzhou.aliyuncs.com");
TranslateECommerceResponse eCommerceResponse = client.getAcsResponse(eCommerceRequest);
Log on to the Alibaba Cloud console with the primary account, and click RAM to enter the Policy Management page. Add a policy.
Authorize the RAM user to call the Machine Translation APIs.
How do I define non-translated elements in the source text and return those elements as they are in the translation?
The source text for translation may contain many elements that do not need to be translated, such as words, abbreviations, and code. Machine Translation provides tags used to define non-translated elements in the source text. Insert