Reputation: 3056
I am using the Google Translate API 2 now, because 1 is no longer available. My query results threw the javascript API look like this:
{
"data": {
"translations": [
{
"translatedText": "Haus"
},
{
"translatedText": "Übersetzung"
},
{
"translatedText": "sdhksjhks"
}
]
}
}
As you see "sdhksjhks" is a translation error, because I did not give the translator a word which it knew. How can I detect this error?
In the API Version 1 a field named 'responseStatus' was returned for every translation.
Upvotes: 0
Views: 219
Reputation: 673
Using the Translate API, if the word you're getting back is the same as the word you sent, then no translation was needed/found. Otherwise your input and output will differ.
Probably not the answer you're looking for, but what I've noticed.
Upvotes: 1