Google Language Detect

34 views
Skip to first unread message

Viplav Kambli

unread,
Feb 12, 2019, 6:49:13 PM2/12/19
to Google Cloud Translation API

Looking at basic language detection -

Following is the code:
$.ajax({  
method: 'POST',
dataType: 'json',
data: { q: inputStr },  // variable text to translate
success: function(result) {
alert(result.responseData.translatedText;
},  
error: function(errorMsg) {
alert(errorMsg); //lands here
}  
});

Can somebody suggest changes Or way to achieve the above? 

George (Cloud Platform Support)

unread,
Feb 22, 2019, 7:09:26 PM2/22/19
to Google Cloud Translation API
Following relevant examples represents usually the easiest way to find the appropriate solution in your code. In this case, you may have a look at the examples linked to on the "Sample applications" page

All this is above the scope of this discussion group, in fact off-topic. You should post such questions to StackOverflow, or other similar forums. This forum meant for general discussion on the platform and its services. By contrast, in StackOverflow, you get in contact with experienced programmers, who are happy to help. 
Reply all
Reply to author
Forward
0 new messages