note 39312 deleted from function.setlocale by derick
| From: | derick@php.net | Date: | Tue, 30 Aug 2005 11:22:36 +0000 |
| Subject: | note 39312 deleted from function.setlocale by derick | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-94408@lists.php.net to get a copy of this message | ||
Note Submitter: mbirth at webwriters dot de
----
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);
?>