From: Masao Mutoh Date: 2004-11-22T00:06:40+09:00 Subject: Re: gettext and require Hi, On Sun, 21 Nov 2004 20:13:08 +0900 Patrick Gundlach 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. > 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