# ANN: Babel 0.1.1 Released

**URL:** <https://www.ruby-forum.com/t/ann-babel-0-1-1-released/125923>\
**Category:** Ruby\
**Created:** [January 13, 2008, 9:29pm UTC](https://www.ruby-forum.com/t/ann-babel-0-1-1-released/125923 "2008-01-13T21:29:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ciconia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/71c47a/32.png) [@ciconia](https://www.ruby-forum.com/u/ciconia)\
**Post date:** [January 13, 2008, 9:29pm UTC](https://www.ruby-forum.com/t/ann-babel-0-1-1-released/125923/1 "2008-01-13T21:29:11Z")

</div>

Babel 0.1.1 has just been released. Babel is a tiny library for  
translating between languages using Google’s automatic language  
translation. More information about Google’s automatic translation can  
be found here:

[http://www.google.com/intl/en/help/faq\_translation.html](http://www.google.com/intl/en/help/faq_translation.html)

=== Installation

sudo gem install babel

=== Usage

Babel.translate(“hello”, :en, :fr) #=\> “Bonjour”

You can also translate a text into multiple languages by supplying  
multiple destination languages:

Babel.translate(“hello”, :en, :fr, :it) #=\> [“Bonjour”, “Ciao”]

There’s also a shorthand version using String#translate:

“your socks are sexy”.translate(:en, :de) #=\> “Ihre Socken sind  
sexy”

=== Supported languages

For a list of supported languages please visit the Google translation  
FAQ:

[http://www.google.com/intl/en/help/faq\_translation.html#langpairs](http://www.google.com/intl/en/help/faq_translation.html#langpairs)

=== More info

Babel RDOC:

[http://babel.rubyforge.org/](http://babel.rubyforge.org/)

Babel source code:

[http://babel.rubyforge.org/svn/trunk/](http://babel.rubyforge.org/svn/trunk/)

---

<div class="post-metadata">

**Author:** ![ciconia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/71c47a/32.png) [@ciconia](https://www.ruby-forum.com/u/ciconia)\
**Post date:** [January 13, 2008, 10:58pm UTC](https://www.ruby-forum.com/t/ann-babel-0-1-1-released/125923/2 "2008-01-13T22:58:20Z")

</div>

Thanks for writing that gem. However installing it via gem install babel  
doesn’t work properly. It installs a babel gem"babel (0.1.4)" (as listed  
by gem list), which has no translate method, but a lot of random stuff.  
Maybe a name conflict?

Regards  
Stefan

---

<div class="post-metadata">

**Author:** ![ciconia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/71c47a/32.png) [@ciconia](https://www.ruby-forum.com/u/ciconia)\
**Post date:** [January 13, 2008, 11:03pm UTC](https://www.ruby-forum.com/t/ann-babel-0-1-1-released/125923/3 "2008-01-13T23:03:31Z")

</div>

Installing via download + local install works nice btw. And thanks  
again, made a butler plugin in 4 lines to translate phrases 🙂

Regards  
Stefan

---

<div class="post-metadata">

**Author:** ![ciconia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/71c47a/32.png) [@ciconia](https://www.ruby-forum.com/u/ciconia)\
**Post date:** [January 14, 2008, 8:11am UTC](https://www.ruby-forum.com/t/ann-babel-0-1-1-released/125923/4 "2008-01-14T08:11:17Z")

</div>

On Jan 13, 11:58 pm, Stefan R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Thanks for writing that gem. However installing it via gem install babel  
> doesn’t work properly. It installs a babel gem"babel (0.1.4)" (as listed  
> by gem list), which has no translate method, but a lot of random stuff.  
> Maybe a name conflict?

Yes, there’s a name conflict with an existing gem. I’ve renamed mine,  
so you now you’ll need to do:

sudo gem install rbabel

And also:

require ‘rbabel’  
“hello”.translate(:en, :fr)

Also new is a command line tool for translation:

cat english.txt | rbabel en:fr \> french.txt

The docs are updated:

[http://babel.rubyforge.org/](http://babel.rubyforge.org/)
