setlocale returns FALSE sometimes
| From: | Patrick Savelberg | Date: | Fri, 17 Mar 2006 15:41:43 +0000 |
| Subject: | setlocale returns FALSE sometimes | ||
| Groups: | php.i18n | ||
| Request: | Send a blank email to php-i18n+get-987@lists.php.net to get a copy of this message | ||
Hi list,
I have a few locales installed on my system:
locale -a
C
POSIX
dutch
nl_BE
nl_BE.iso88591
nl_BE.iso885915@euro
nl_BE.utf8
nl_BE.utf8@euro
nl_BE@euro
nl_NL
nl_NL.iso88591
nl_NL.iso885915@euro
nl_NL.utf8
nl_NL.utf8@euro
nl_NL@euro
In my PHP code I have the following two lines:
if( !setlocale(LC_TIME, 'nl_NL') ) {
die("Failed setting locale");
}
Now when I load this script a few times, sometimes I get the message "Failed
setting locale", but not every time.
Why does this happen or what can I do to overcome this?