"From my experience English to Spanish translation works pretty well"
I think there's a connection.
GT is better than a lot of machine translation systems, but it still falls victim to a number of common problems that face such systems. Specifically, I've run into a lot of major word-sense-disambiguation issues, especially when working with the sort of short snippets of text that the gem in question uses as examples. Basically, that sort of short bit of text is a worst-case scenario for statistical machine translation, since there's so little context. Google generally does much better with longer runs of text than it does with short phrases.
$gt = new Gtranslate; echo "Translating [Ciao mondo] Italian to English => ".$gt->it_to_en("Ciao mondo");
edit: and, BTW, the to_spanish method is not defined in the https://github.com/jimmycuadra/to_lang/blob/master/lib/to_la... module.
ruby-1.8.7-p302 > "Where is the bathroom?".to_spanish
=> "\302\277D\303\263nde est\303\241 el ba\303\261o?"Investigate Unicode support for Ruby 1.8. to_lang has only been tested with 1.9.
Do you have a copy of 1.9 to test with?
ruby-1.9.2-p0 > "Where is the bathroom?".to_spanish
=> "¿Dónde está el baño?"
Thankshttp://www.joelonsoftware.com/articles/LeakyAbstractions.htm...
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.