What's wrong with my request?
I have sting in russian:
$string = Потенциал, %
I want to translate it to ukrainian with google API:
I urlencode string:
$q = urlencode($string)
And i request google API:
https://www.googleapis.com/language/translate/v2?q=%D0%9F%D0%BE%D1%82%D0%B5%D0%BD%D1%86%D0%B8%D0%B0%D0%BB%2C%20%25&target=ua&source=ru&key=A...
In response I get :
{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalid",
"message": "Invalid Value"
}
],
"code": 400,
"message": "Invalid Value"
}
}
What's wrong with my request?
Solution was simple. Google has UK letters for ukrainian instead of UA.
The target should be uk not ua.I think it will resolve the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With