How do I get locale day and month?

ZeK005

New Member
I'm using the following function to retrieve date and time:\[code\] function formatEventTime($time, $type, $locale = 'nb_NO') { setlocale(LC_TIME, $locale); switch($type) { case 'date' : $format = '%d.%m'; break; case 'dm' : $format = '%d. %B'; break; case 'time' : $format = '%H:%M'; break; case 'dmy' : $format = '%d.%m.%Y'; break; } return strftime($format, strtotime($time)); }\[/code\]wher \[code\]$time = 2010-12-03 10:00:00\[/code\].The problem is that my days and months are still in English. How do I change this to e.g. Norwegian?Update
This works on my server, but not on my locale machine.
 
Back
Top