I have a column which is a Timestamp.
It records something like: 2010-02-08 12:10:22
Then I use this in php:
$postdate = date( "j F", strtotime( $row['modify_date'] ) );
And it can output something like: 8 February
My Q is, how can I change the date-text so it outputs the month name in another language (swedish specifically)?
Ex: January is in Swedish Januari
Thanks
The native PHP function for that is strftime().
if the server is not in the swedish locale, use setlocale().
That said, I have had so many troubles with
setlocale()in the past, especially on shared hosting, that I tend to keep an array of month names in whatever config file / dictionary file the project has: