Download it here
Authors: Chad Fowler (chadfowler@chadfowler.com)
James McMurry (jmcmurry@pobox.com) # made it less "anglo-centric".
Title: BabelFish
Disclaimer: I personally question both the usefulness of this library *and*
the soundness of its construction. But, it was fun, and it makes me laugh.
There is some massively tight coupling with the HTML presentation of
babelfish.altavista.com. Perhaps it would be cleaner to parse the page into
a DOM and select elements that way, but who cares--it's a joke anyway, right?
If you have any refactorings, I'd love to have them. It's really not very
Rubyish as it is.
Description: This library can do Babelfish translations. It's main purpose
was to be able to translate some text from one language to another language and
back, to produce something silly.
Usage:
puts BabelFish.stupidize("Some text that will sound silly when returned.")
puts BabelFish.translate("en_fr", "Something you'd like translated.") # translates to french
...or to run it as a commandline program...
./babel.rb README
Languages: (All subject to change unpredictability based on the whims of Altavista)
en_zh English to Chinese
en_fr English to French
en_de English to German
en_it English to Italian
en_ja English to Japanese
en_ko English to Korean
en_pt English to Portuguese
en_es English to Spanish
zh_en Chinese to English
fr_en French to English
fr_de French to German
de_en German to English
de_fr German to French
it_en Italian to English
ja_en Japanese to English
ko_en Korean to English
pt_en Portuguese to English
ru_en Russian to English
es_en Spanish to English