Forum: Ruby Recommendations for localization on Ruby 1.9?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
31e038e4e9330f6c75ccfd1fca8010ee?d=identicon&s=25 Gregory Brown (Guest)
on 2009-02-12 23:01
(Received via mailing list)
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.
Bc368ef524130e8d0deb386de961e24a?d=identicon&s=25 Suraj Kurapati (snk)
on 2009-02-13 18:03
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://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 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-your-project
31e038e4e9330f6c75ccfd1fca8010ee?d=identicon&s=25 Gregory Brown (Guest)
on 2009-02-13 18:30
(Received via mailing list)
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://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
669b7046f02e5dfc4bda4421f1069731?d=identicon&s=25 Alex Fenton (Guest)
on 2009-02-14 06:01
(Received via mailing list)
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://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
31e038e4e9330f6c75ccfd1fca8010ee?d=identicon&s=25 Gregory Brown (Guest)
on 2009-02-14 15:28
(Received via mailing list)
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-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
This topic is locked and can not be replied to.