setlocale problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nita
Forum Commoner
Posts: 39
Joined: Wed May 02, 2007 5:49 am

setlocale problem

Post by nita »

Hi

What i'm trying to do is to have posibility to display day names in other languages.
Code below works perfect with english, but dosent seems to work with dutch or french for instance. Still displays in english.

Code: Select all


setlocale(LC_TIME, 'NL_nl');
	$datestamp=$_POST['datestamp'];

	echo "$datestamp";

echo strftime('%A %e %B %Y ', strtotime($datestamp));

$weekday = date('l', strtotime($datestamp)); 
echo $weekday;

Missing something here ?? Can someone help me with it?

Thank you very much in advance
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: setlocale problem

Post by Christopher »

Are you sure you have the NL_nl data installed? Have you tried just nl? What is the return value for setlocale() ?
(#10850)
Post Reply