bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gettext problem - translation fails


From: Eneko Lacunza
Subject: Re: gettext problem - translation fails
Date: 01 Apr 2003 09:59:17 +0200

Hi,

El lun, 31 de 03 de 2003 a las 19:35, Petr Vandrovec escribió:
> On 31 Mar 03 at 12:16, Eneko Lacunza wrote:
> > El lun, 31 de 03 de 2003 a las 12:57, Petr Vandrovec escribiˇ:
> > > On 31 Mar 03 at 11:44, Eneko Lacunza wrote:
> > > >     I'm having some problems with gettext and apache+php. The problem
> > > > starts when I update .mo files some PHP programs are using. Sometimes
> > > > (not everytime) gettext starts failing to traslate strings. When this
> > > > starts, gettext will translate about 1/4 of pages generated from PHP.
> > > You are installing .mo files wrong way. Please use 'install' program
> > > to install them, and restart apache afterwards. Do not install .mo
> > > files with 'cp' or 'cat'... .mo files should be treated same way as
> > > shared libraries.
> >     Does this mean that the problem I'm suffering is "normal"? This would
> > make gettext almost unusable for real purposes in such environments 8(
> >     Would it help if I first remove old .mo files?
> Yes, it will fix partial translations or core dumps. But apache will 
> start using new files only after you restart it :-( 
> Unfortunately according to my checks there is no way to invalidate 
> this caching, glibc will always use already existing item from cache 
> for same pair of values you pass to bindtextdomain(). So you have to either
> change domain name or locale path in your php code after each update
> of .mo files, or you have to restart apache.

        This is quite strange. I don't have any knowledge about how glibc is
coded, but it seems that after "some time", the problem stabilizes and
all instances of apache translate correctly. Maybe it is that all "old"
instances crashed and new ones have the new .mo file.

        Anyway, it is quite weird to have a production server in shuch a weird
state for some hours.

        Although I don't know the problems involved here, I would suggest
trying to fix this in new glibc versions, maybe transparently, or maybe
with a simple function call (i.e. domain_refresh) that would force a
fresh load of the text domain.

Regards and thanks for your help.
                                           
-- 
Eneko Lacunza
Enlar/Euskalamiga

http://www.euskal.org






reply via email to

[Prev in Thread] Current Thread [Next in Thread]