note 39312 added to function.setlocale

From: Date: Sat, 24 Jan 2004 01:00:02 +0000
Subject: note 39312 added to function.setlocale
Groups: php.notes 
Request: Send a blank email to php-notes+get-64093@lists.php.net to get a copy of this message
I noticed that PHP sometimes doesn't switch the locale as it should. Although I used <?php setlocale(LC_TIME, 'German'); ?>, I sometimes got e.g. "Monday" instead of "Montag" for the day of week. So I now set the locale using the following do ... while: <?php $locale = 'de_DE.ISO8859-1'; do { $locale_result = setlocale(LC_TIME, $locale); } while ($locale_result != $locale); ?> ---- Manual Page -- http://www.php.net/manual/en/function.setlocale.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+39312 Delete -- http://master.php.net/manage/user-notes.php?action=delete+39312&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+39312&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#64093) next »