[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Recommendations for localization on Ruby 1.9?

Gregory Brown

2/12/2009 9:59:00 PM

Hi folks,

I am researching localization techniques for the 'Reducing Cultural
Barriers' chapter in my book. Does anyone have experience with a
library they like which works on Ruby 1.9?
Although I have some experience with the m17n framework in Ruby 1.9, I
don't know a lot about localization tools, which is the other side of
the internationalization coin.
Any suggestions would be welcome!

-greg

PS: If there aren't good tools out there for this already and you have
a hand rolled solution, I'd be happy to look at that too.

--
Technical Blaag at: http://blog.majesticseacr...
Non-tech stuff at: http://metametta.bl...
"Ruby Best Practices" Book now in O'Reilly Roughcuts:
http://rubybestpra...

4 Answers

Suraj Kurapati

2/13/2009 5:02:00 PM

0

Gregory Brown wrote:
> Although I have some experience with the m17n framework in Ruby 1.9, I
> don't know a lot about localization tools, which is the other side of
> the internationalization coin.

What do you mean by localization tools? GUIs or text editor plugins
that make it easy to edit GNU gettext .po translation files? There's
lots of those on http://fre...

> If there aren't good tools out there for this already and you have
> a hand rolled solution, I'd be happy to look at that too.

I have[1] a very simple hand-rolled solution (a Hash with a
Kernel#sprintf interface) which ignores character encoding at the moment
because I've been relying on YAML to detect & handle the encoding
issues---so far it works great for Unicode and the latin ISO charsets.

I've used this solution successfully in two projects; one of them for
~1.5 years. Someday I'll factor in Ruby 1.9's character encoding
abilities, but that may not be necessary if YAML beats me to it. :-)

[1]: http://snk.tuxfamily.org/lib/inochi/#Translate-yo...
--
Posted via http://www.ruby-....

Gregory Brown

2/13/2009 5:28:00 PM

0

On Fri, Feb 13, 2009 at 12:02 PM, Suraj Kurapati <snk@gna.org> wrote:
> Gregory Brown wrote:
>> Although I have some experience with the m17n framework in Ruby 1.9, I
>> don't know a lot about localization tools, which is the other side of
>> the internationalization coin.
>
> What do you mean by localization tools? GUIs or text editor plugins
> that make it easy to edit GNU gettext .po translation files? There's
> lots of those on http://fre...

No, I mean libraries for handling translation files within an application.

>> If there aren't good tools out there for this already and you have
>> a hand rolled solution, I'd be happy to look at that too.
>
> I have[1] a very simple hand-rolled solution (a Hash with a
> Kernel#sprintf interface) which ignores character encoding at the moment
> because I've been relying on YAML to detect & handle the encoding
> issues---so far it works great for Unicode and the latin ISO charsets.

Thanks for sharing. I really want to show something that doesn't
ignore character encoding if possible, but I could look into this if
there aren't better options.

-greg

--
Technical Blaag at: http://blog.majesticseacr...
Non-tech stuff at: http://metametta.bl...
"Ruby Best Practices" Book now in O'Reilly Roughcuts:
http://rubybestpra...

Alex Fenton

2/14/2009 4:55:00 AM

0

Gregory Brown wrote:
> On Fri, Feb 13, 2009 at 12:02 PM, Suraj Kurapati <snk@gna.org> wrote:
>> Gregory Brown wrote:
>>> Although I have some experience with the m17n framework in Ruby 1.9, I
>>> don't know a lot about localization tools, which is the other side of
>>> the internationalization coin.
>> What do you mean by localization tools? GUIs or text editor plugins
>> that make it easy to edit GNU gettext .po translation files? There's
>> lots of those on http://fre...
>
> No, I mean libraries for handling translation files within an application.

If by "handling" translation files you mean marking translatable strings
and having them replaced when an application runs, then ruby-gettext
works fine for me with 1.9. I use it with a wxRuby app, but the
documentation suggests it can also be used for Rails.

http://www.yotabanana.com/hiki/ruby-ge...

a

Gregory Brown

2/14/2009 2:26:00 PM

0

On Fri, Feb 13, 2009 at 11:58 PM, Alex Fenton <alex@deleteme.pressure.to> wrote:

> If by "handling" translation files you mean marking translatable strings and
> having them replaced when an application runs, then ruby-gettext works fine
> for me with 1.9. I use it with a wxRuby app, but the documentation suggests
> it can also be used for Rails.
>
> http://www.yotabanana.com/hiki/ruby-ge...

Yep, somehting along the lines of ruby-gettext is what I'm looking
for. I'll need to try it out on 1.9, but in the mean time, does
anyone else have any experiences with this lib or other ones?

Thanks Alex for suggesting this.

-greg


--
Technical Blaag at: http://blog.majesticseacr...
Non-tech stuff at: http://metametta.bl...
"Ruby Best Practices" Book now in O'Reilly Roughcuts:
http://rubybestpra...