Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Enable setlocale and strftime PHP functions on OS X.2 UNIX
The setlocale and strftime functions don't work on OS X.2. For example, if I make a PHP file that says:
  setlocale(LC_TIME, 'fr'); 
  echo strftime("%A %d %B %Y"); 
The result is:

Monday 04 August 2003 ... that's too bad!

So I built a package for enabling locales. After installing it, the same program returns:

Lundi 4 Aout 2003

The package supports over 20 locales, with multiple settings within each locale, and can be downloaded here: locales package

[robg adds: I haven't tested this one...]
    •    
  • Currently 1.33 / 5
  You rated: 2 / 5 (3 votes cast)
 
[4,712 views]  

Enable setlocale and strftime PHP functions on OS X.2 | 5 comments | Create New Account
Click here to return to the 'Enable setlocale and strftime PHP functions on OS X.2' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Enable setlocale and strftime PHP functions on OS X.2
Authored by: gdsimms on Aug 09, '03 01:36:24PM

Thank You!

Now I can write my "France Irrelevance Clock" ticker...



[ # ]
Enable setlocale and strftime PHP functions on OS X.2
Authored by: notmatt on Aug 10, '03 09:38:43PM

Don't you mean your Freedom Irrelevence Clock?



[ # ]
Enable setlocale and strftime PHP functions on OS X.2
Authored by: davidcrickett on Aug 10, '03 10:56:00AM

It's not working on my machine.

---
davidcrickett



[ # ]
Enable setlocale and strftime PHP functions on OS X.2
Authored by: Gwyrrdin on Aug 17, '03 01:24:10PM

Not working on my machine either.
OS X 10.2.6



[ # ]
Enable setlocale and strftime PHP functions on OS X.2
Authored by: Gwyrrdin on Aug 17, '03 01:28:58PM
Excuses,

It does work.

It doesn't work with setlocale (LC_ALL, 'nl_NL');
But with setlocale (LC_TIME, 'nl_NL'); it does work!

[ # ]