I suspect there's just not enough text there for detect to work right. It 
really struggles with short strings and/or random words bunched together. I 
would suggest specifying the language if possible and/or sending actual phrases 
that are no less than three words in length. In my experimentation over the 
years, it was at about three words that you can start to trust the detection 
and translation.

Jeremy R. Geerdes
Generally Cool Guy
Des Moines, IA

For more information or a project quote:
[email protected]

If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church!

On May 12, 2011, at 1:25 PM, golubev wrote:

> Yes, when add "&source=ru" to url request completes successfully. But
> language detecting don't work correctly? It is an error in API?
> 
> 
> On 12 май, 18:06, Jeremy Geerdes <[email protected]> wrote:
>> I am wondering if, for some reason, it's failing to detect the language as 
>> Russian. See what happens when you add &source=ru to your url.
>> 
>> Jeremy R. Geerdes
>> Generally Cool Guy
>> Des Moines, IA
>> 
>> For more information or a project quote:
>> [email protected]
>> 
>> If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan 
>> Church!
>> 
>> On May 12, 2011, at 8:44 AM, golubev wrote:
>> 
>> 
>> 
>>> Hi.
>>> For some requests I get the response:
>> 
>>> {
>>> "error": {
>>>  "errors": [
>>>   {
>>>    "domain": "global",
>>>    "reason": "badRequest",
>>>    "message": "Bad language pair: {0}"
>>>   }
>>>  ],
>>>  "code": 400,
>>>  "message": "Bad language pair: {0}"
>>> }
>>> }
>> 
>>> Request for example:
>> 
>>> https://www.googleapis.com/language/translate/v2?key=<MY_KEY>&target=en&q=%D0%A5%D0%BE%D1%87%D1%83%20%D0%BD%D0%B0%D0%B9%D1%82%D0
>>>  %B8
>> 
>>> (I try to translate russian words "Хочу найти")
>> 
>>> Why this error happen?
>> 
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "Google AJAX APIs" group.
>>> To post to this group, send email to 
>>> [email protected].
>>> To unsubscribe from this group, send email to 
>>> [email protected].
>>> For more options, visit this group 
>>> athttp://groups.google.com/group/google-ajax-search-api?hl=en.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Google AJAX APIs" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/google-ajax-search-api?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-ajax-search-api?hl=en.

Reply via email to