# Requesting feedback on Gibberish::Simple, a tiny Ruby 1.9 localization lib

**URL:** <https://www.ruby-forum.com/t/requesting-feedback-on-gibberish-simple-a-tiny-ruby-1-9-localization-lib/161753>\
**Category:** Ruby\
**Created:** [March 2, 2009, 4:19am UTC](https://www.ruby-forum.com/t/requesting-feedback-on-gibberish-simple-a-tiny-ruby-1-9-localization-lib/161753 "2009-03-02T04:19:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![naething](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/e47774/32.png) [@naething](https://www.ruby-forum.com/u/naething)\
**Post date:** [March 2, 2009, 4:19am UTC](https://www.ruby-forum.com/t/requesting-feedback-on-gibberish-simple-a-tiny-ruby-1-9-localization-lib/161753/1 "2009-03-02T04:19:14Z")

</div>

Hi folks,

While writing a section on localization for my book[0], I noticed that  
there doesn’t seem to be a localization system that works out of the  
box on Ruby 1.9.  
The changes to get either Ruby-GetText[1] or Gibberish[2] to work were  
minimal, though.

I really liked the general idea behind Gibberish, since it has a nice  
Ruby interface and is very easy to configure. But it was a Rails  
plugin, and needed some small modifications to work standalone.  
I also wasn’t wild about using String#[] to do translation tagging, as  
it seemed it’d be just as easy to get by without modifying core. I  
did some other cleanup under the hood and removed the dependency on  
ActiveSupport, and put up Gibberish::Simple:

> **[GitHub - practicingruby/gibberish-simple: Experiment in modifying Gibberish...](https://github.com/practicingruby/gibberish-simple)**
>
> Experiment in modifying Gibberish to work standalone in Ruby 1.9 - GitHub - practicingruby/gibberish-simple: Experiment in modifying Gibberish to work standalone in Ruby 1.9

I’m curious if folks find this interesting / useful enough for an  
official release and further maintenance? I would be fine with just  
using it as a book example, but if others find it useful beyond that,  
I can document it, polish it up a bit, and push a gem.

== More Details ==

This library keeps most of the functionality Gibberish offers. In  
most cases, you just need to switch:

“My String”[:tag, \*args]

to look like this:

T(“My String”, :tag, \*args)

After including the Gibberish::Simple module. Also, you replace any  
call on Gibberish with a call to Gibberish::Simple. Some minor  
features were removed, but otherwise it’s mostly the same library.

If you’re curious of what it looks like in a code sample, I coded up a  
tiny Sinatra app that implements the rock paper scissors game:

> <https://github.com/practicingruby/gibberish-simple/tree/223100a156432420400762805330ebe7e3aa346a/examples/rps>
>
> //github.com/practicingruby/gibberish-simple/tree/223100a156432420400762805330ebe7e3aa346a/examples/rps

You will need Sinatra 0.9.1 (from Github) and Ruby 1.9.1 to run this  
code.

Please let me know what you think.

-greg

---

<div class="post-metadata">

**Author:** ![naething](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/e47774/32.png) [@naething](https://www.ruby-forum.com/u/naething)\
**Post date:** [March 2, 2009, 4:20am UTC](https://www.ruby-forum.com/t/requesting-feedback-on-gibberish-simple-a-tiny-ruby-1-9-localization-lib/161753/2 "2009-03-02T04:20:24Z")

</div>

On Sun, Mar 1, 2009 at 10:18 PM, Gregory B.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi folks,
> 
> While writing a section on localization for my book[0], I noticed that  
> there doesn’t seem to be a localization system that works out of the  
> box on Ruby 1.9.  
> The changes to get either Ruby-GetText[1] or Gibberish[2] to work were  
> minimal, though.

Whoops, always forget the links :-/

[0] [http://rubybestpractices.com](http://rubybestpractices.com)  
[1] [http://www.yotabanana.com/hiki/ruby-gettext.html?ruby-gettext](http://www.yotabanana.com/hiki/ruby-gettext.html?ruby-gettext)  
[2] [GitHub - defunkt/gibberish: Dead simple Rails localization.](http://github.com/defunkt/gibberish/tree/master)

---

<div class="post-metadata">

**Author:** ![naething](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/e47774/32.png) [@naething](https://www.ruby-forum.com/u/naething)\
**Post date:** [March 2, 2009, 9:59am UTC](https://www.ruby-forum.com/t/requesting-feedback-on-gibberish-simple-a-tiny-ruby-1-9-localization-lib/161753/3 "2009-03-02T09:59:37Z")

</div>

Hi Gregory,

Gregory B. wrote:

> Hi folks,
> 
> While writing a section on localization for my book[0], I noticed that  
> there doesn’t seem to be a localization system that works out of the  
> box on Ruby 1.9.  
> The changes to get either Ruby-GetText[1] or Gibberish[2] to work were  
> minimal, though.
> 
> …
> 
> [GitHub - practicingruby/gibberish-simple: Experiment in modifying Gibberish to work standalone in Ruby 1.9](http://github.com/sandal/gibberish-simple/)
> 
> I’m curious if folks find this interesting / useful enough for an  
> official release and further maintenance? I would be fine with just  
> using it as a book example, but if others find it useful beyond that,  
> I can document it, polish it up a bit, and push a gem.

I just need such a library at the moment.

> Please let me know what you think.

I’ll try it and will report feedbacks on this thread.

Cheers.

Chauk-Mean.

---

<div class="post-metadata">

**Author:** ![naething](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/e47774/32.png) [@naething](https://www.ruby-forum.com/u/naething)\
**Post date:** [March 2, 2009, 9:33pm UTC](https://www.ruby-forum.com/t/requesting-feedback-on-gibberish-simple-a-tiny-ruby-1-9-localization-lib/161753/4 "2009-03-02T21:33:29Z")

</div>

Hi (again) Gregory,

> Gregory B. wrote:  
> I’m curious if folks find this interesting / useful enough for an  
> official release and further maintenance? I would be fine with just  
> using it as a book example, but if others find it useful beyond that,  
> I can document it, polish it up a bit, and push a gem.

This is exactly what I need :

- not intrusive regarding the core classes
- simple (no dependency other than the standard yaml library)
- ruby-1.9 support

It is just perfect for me.

Go on for an official release and maintenance.  
Thanks for sharing anyway.

Cheers.

Chauk-Mean.
