Skip to content

Comment on "this gem is awesome".to_spanish # = "esta joya es impresionante"

Comments

Since this gem appears to use Google's public API, one important thing to keep in mind is that there's probably a hard limit on the amount of text that can be translated at one go. I've found that throwing more than a thousand or so characters at GT's API results in their server throwing "URI too long" errors, since it only works via HTTP GET.

Disclaimer: This might have changed in the five or six months since I last messed around with Google's API, or, alternatively, this gem could be doing something clever to try and get around the problem. Either way, I'd suggest checking it out.

From memory, other limitations include 100,000 characters per day, and limits on where the API can be used (e.g. can't use it for paid services).

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.