From: Tomas K. <to...@us...> - 2005-04-10 15:54:57
|
> Marczisovszky Daniel wrote: > > >> IMHO textdomain is suitable when you have such source that has a >> linear flow. In such cases as my plugin, where setPref is not called by a >> main method of my plugin, but rather from everywhere in SquirrelMail the >> only solution is to change domain at entering and leaving setPref >> function. >> >> I guess this would slow down things and I want to avoid this. Is there >> any suggestion? > > I believe this is addressed in the gettext manual: > > > http://www.gnu.org/software/gettext/manual/html_chapter/gettext_10.html#S > EC147 > > > so what you probably need to do, is initialize the domain with > bindtextdomain() at the start, and then try to use dcgettext, specifying > the textdomain everytime. > > http://de3.php.net/manual/en/function.dcgettext.php http://www.php.net/dcgettext > Also tell us if it works. :-) > > > Caveat: it will not work for Squirrelmail's hack that enables gettext > even without the gettext extension being built in, but I don't consider > this as very important... It should work in 1.5.1cvs. All loaded gettext domains are stored in array. Only dcgettext wrapper has to be created. -- Tomas |