FAQ
What languages are currently supported by Machine Translation?
Machine Translation of the e-commerce edition
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 of the universal edition
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.
What is the code for each language?
en English
ru Russian
fr French
zh Simplified Chinese
es Spanish
pt Portuguese
ar Arabic
tr Turkish
th Thai
vi Vietnamese
id Indonesian
What are the error codes, and what do they mean?
Error codes | Description | Solution |
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. |
Is partial result customization supported?
Partial result customization is not supported for the moment. If part of the translation is incorrect, contact Customer Support to correct it.
Is there a limit on the number of characters for a single translation request?
The length of the text string for a single translation cannot exceed 2000, and is calculated by using String.length() <=2000 of Java.
Does Machine Translation provide other forms of translation in addition to text translation?
Currently, only text translation is available. The APIs for voice translation and image translation will be provided in the future.
Does Machine Translation provide custom translation services?
Contact Customer Support if you need custom translation services.
What do I do when calling the Java SDK returns the error SDK.InvalidRegionId?
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.setScene("communication");
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);
System.out.println(JSON.toJSON(eCommerceResponse));
How do I solve the authorization problem of a RAM user when calling the Machine Translation APIs?
Log on to the Alibaba Cloud console with the primary account, and click RAM to enter the Policy Management page. Add a policy.
MyAlimtFullAccess
{
"Statement": [
{
"Effect": "Allow",
"Action": "alimt:*",
"Resource": "*"
}
],
"Version": "1"
}
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 before a non-translated element (there is a space after ALIMT), and insert after the same non-translated element. See the following figure.