note 44685 deleted from function.setlocale by cmb

From: Date: Sun, 10 Nov 2019 12:26:31 +0000
Subject: note 44685 deleted from function.setlocale by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-212968@lists.php.net to get a copy of this message
Note Submitter: dv at josheli dot com ---- On Novell Netware, the language codes require hyphens, not underscores, and using anything other than LC_ALL doesn't work directly. So... (from their support list).... You have to set TIME, NUMERIC etc. info in two steps as given below rather than one. This is due to the limitation of setlocale function of LibC. <?php setlocale(LC_ALL, 'es-ES'); $loc = setlocale(LC_TIME, NULL); echo strftime("%A %e %B %Y", mktime(0, 0, 0, 12, 22, 1978)); // jeuves 22 diciembre 1978 ?> This should work. or of course, reset LC_ALL... <?php setlocale(LC_ALL, 'es-ES'); echo strftime("%A %e %B %Y", mktime(0, 0, 0, 12, 22, 1978)); setlocale(LC_ALL, ''); // jeuves 22 diciembre 1978 ?>

« previous php.notes (#212968) next »