In this article
You can read the translation status via the status object which is returned by the call to SurveyTranslator, Translate() as shown below. The status object has two properties; “Status” and “Message”. In the event of a successful translation the Status is set to “Success” and Message will be empty. For Failures the Status will be “Failure” and the Message will contain details of the error.
Below is an example of the code - you can add to the Validation tab for the question to send a custom email to the person responsible for your Microsoft Translate account:
var status = SurveyTranslator.Translate("q1_eng", 9);
if(status != null){
if(status.Status == "Failure"){
SendMail("no-reply-TranslationDemo@confirmit.com ","your.email@address","Translation Error",
"<The text of the email>");
}
}Figure 1 - Example of the code added to the Verification tab