setlocale returns FALSE sometimes
[email protected] ("Patrick Savelberg")
| Newsgroups | php.i18n |
|---|---|
| Message-ID | <[email protected]> |
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?