From: Masao Mutoh Date: 2005-05-02T14:48:01+09:00 Subject: Re: [ANN] Ruby-GetText-Package-0.9.0 Hi, On Mon, 2 May 2005 01:44:10 +0900 Sascha Ebach wrote: > Masao Mutoh wrote: > > Hi, > > > > Ruby-GetText-Package-0.9.0 is now available. > > > > Highlights > > ---------- > > CGI/ERB is now supported. > > > > It is inspired from "Using Gettext To Translate Your > > Rails Application"[*1]. The documentation is very > > nice for an application, but not complete as a > > framework. Because it allows only a textdomain > > (messages.mo only). > > I'm not good at RoR, so I can't improve it now, > > but I hope someone try "real L10n support" on ROR. > > > > [*1] http://manuals.rubyonrails.com/read/book/16 > > Ah, thank you Masao, I will integrate this as soon as I can. Much > appreciated. I appreciate you too ;). This release is depend on your ideas heavily. > The reason for hacking Ruby-GetText to only use one mo file is that > virtually any "web" application I know only has one. This has probably > to do something with the amount of files you can have in a web app. For > example, a web app can have hundreds of template files. You surely > wouldn't want to have hundreds of mo files or use #bindtextdomain all > over the place. And if you do you can simply not use the hack ;) > > You are right about the usage as a framework. It would be nice if this > behavior would be configurable so one can use whatever fits best. It's better to describe faults. * It won't work correctly when it requires other libraries which support GetText. * You can't separate textdomains in a web app such as "bbs", "scheduler". * If rails uses GetText itself as L10n, it will have "rails" textdomain, but it won't work correctly with your hack. --- Now, "gettext/container" supports "instance-based/module-based texdomain" not file-based. It's similer with your idea but it allows plural textdomains and it also doesn't affect other libraries which support GetText. #And "gettext/erb" is an instance-based 'ERB' textdomain. So I think if a class/module which generates HTML from ERB on rails includes "gettext/erb", then you don't need to call #bindtextdomain on each files and some faults are solved. -- .:% Masao Mutoh