Masao Mutoh
11/21/2004 3:07:00 PM
Hi,
On Sun, 21 Nov 2004 20:13:08 +0900
Patrick Gundlach <clr3.10.randomuser@spamgourmet.com> wrote:
> Dear Rubyists,
>
> I use ruby gettext (very nice, though!) and have split up my code in
> several files, that I include with require. But in the new files, the
> translation effect is lost.
<snip>
> this is OK. Both Hello World get translated. But if I move the code
> "class B .... end" to the other file, only the first Hello World gets
> translated. I have to put the line with bindtextdomain somewhere in
> the second file to get gettext working correctly. I think that this
> has something to do with ruby discarding local stuff when using
> require.
Now, Ruby-GetText-Package manages a catalog-file(mo-file) per a file,
not per a class/module.
So you have to call GetText.bindetextdomain once a file.
--
:% Masao Mutoh<mutoh@highway.ne.jp>