开发者

Google translate V2, certain text seems to break it

开发者 https://www.devze.com 2023-04-02 05:38 出处:网络
I\'m trying to use the new version of the Google Translate API (V2) via the .NET API. It seems that the following t开发者_如何学Pythonext breaks it

I'm trying to use the new version of the Google Translate API (V2) via the .NET API. It seems that the following t开发者_如何学Pythonext breaks it

rt
@@




?????wwweryxc cet3f64

I thought maybe it was just the .NET wrapper but it seems to break the URL call as well, if you pass it any normal text it returns fine, if you pass this text the .NET API will just completely hang and not return anything or throw an error. If you do it via the web call you don't get a file returned in the browser, whereas you do with other text.

You can test the API online here: https://code.google.com/apis/explorer/#_s=translate&_v=v2&_m=translations.list

Does anyone know why? I'd expect it to just return the same comment not translated.


I had the same issue with the following sentences:

  • All new categories must be a subcategory of Letters.

  • All new categories must be a subcategory of Descriptions.

Setting the source language solves it.

Though it is really is strange as changing categories to category also makes it work... it definitely seems as though there's some glitch in the backend that gets triggered in some unique cases.

Also, this sentence works:

  • All new categories must be a subcategory of Items.


Apparantly the auto language detection just doesn't like random text, would have expected an error to be thrown to .NET though. So need to make sure to pass in the source language if you know it

0

精彩评论

暂无评论...
验证码 换一张
取 消