Recommendations for localization on Ruby 1.9?

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.

Gregory B. 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://freshmeat.net

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 have1 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. :slight_smile:

On Fri, Feb 13, 2009 at 12:02 PM, Suraj K. [email protected] wrote:

Gregory B. 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://freshmeat.net

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

Gregory B. wrote:

On Fri, Feb 13, 2009 at 12:02 PM, Suraj K. [email protected] wrote:

Gregory B. 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://freshmeat.net

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-gettext.html

a

On Fri, Feb 13, 2009 at 11:58 PM, Alex F.
[email protected] 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-gettext.html

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