Closed bgrusdt closed 7 years ago
This is odd. When I do the API call in postman I get a proper translation "Zeigen sie mir ein Beispiel zu folgen", the tutorial shows something different: "20 %20source%, 20 %20me%, 20, %20the%.".
@andish can you please take a look at this tutorial?
seems that here is double-escaped text submitted for translation.
Here is a javascript function sendAPIRequest() containing an ajax method. As ajax post method do not override content-type , by default it is content-type: application/x-www-form-urlencoded, this means that there is no need to encode the input value.
So change encodeURIComponent($("#input").val()) to $("#input").val()
@bgrusdt please try to update the code.
Thank you, @andish for the explanation. It was the problem and is fixed now.
The example API Call in the article how to write a Tutorial is a call to tilde/translation. Its response seems to be wrong:
The same call with Postman contains the translated sentence it its response: