nita Posted January 14, 2012 Share Posted January 14, 2012 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. 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 Link to comment https://forums.phpfreaks.com/topic/254999-setlocale-problem/ Share on other sites More sharing options...
silkfire Posted January 14, 2012 Share Posted January 14, 2012 Try NL_nl.iso-8859-1 or NL_nl.utf8. If that doesn't work, do you know if your server is Unix? If so you can check which locales are installed. Link to comment https://forums.phpfreaks.com/topic/254999-setlocale-problem/#findComment-1307550 Share on other sites More sharing options...
nita Posted January 14, 2012 Author Share Posted January 14, 2012 Found the problem New code looks like this: setlocale(LC_ALL, 'nl_NL'); $datestamp=$_POST['datestamp']; echo "$datestamp"; echo strftime('%A', strtotime($datestamp)); but im about to check with your setting too.. Thank you Link to comment https://forums.phpfreaks.com/topic/254999-setlocale-problem/#findComment-1307551 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.