Re: Setlocale() not working

From: Date: Fri, 24 Oct 2003 15:26:40 +0000
Subject: Re: Setlocale() not working
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-167437@lists.php.net to get a copy of this message
* Thus wrote Mauricio Cuenca (mauricio@aguapanela.com): > Hello, > > I'm trying to print the full date in spanish using the following lines: > > setlocale(LC_TIME, 'es_ES'); > strftime(DATE_FORMAT_LONG, mktime(0, 0, 0, 12, 31, 2002)); > > But my sysadmin tells me that the server doesn't have the spanish locale > installed. Is there a way that I can write the date in other language > without the need to harcode the weekday names ??? Using only the strftime > function ??? In theory, you can install the locale language in your home dir: /path/to/your/homedir/locale/es_ES* then set the environment to look there instead: setenv('PATH_LOCALE', '/path/to/your/homedir'); and then the setlocale and strftime should work. Of course this is theory. Curt -- "My PHP key is worn out" PHP List stats since 1997: http://zirzow.dyndns.org/html/mlists/

« previous php.general (#167437) next »