I'm using the following function to retrieve date and time:
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));
}
wher $time = 2010-12-03 10:00:00
.
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.