I have tried to find a solution to this issue for many hours to no avail. I am using wordpress 3.3.1 in English and I have set the locale in wp-config.php to Swedish and uploaded the Swedish language files (sv_SE.mo & sv_SE.po) to the languages folder. The Admin panel now displays in Swedish as well as the front-end post dates and comment dates, whereas the front-end comment reply dates are still displayed in English.
Here is the code from my comments template (functions.php) which may be helpful. There are two lines where the date format is submitted – in the ninth line from the top and in the fourth line from the bottom. In both cases the date format is given as ('j M Y H:i'), but they output the date in different languages. The top one produces a Swedish date while the bottom date is output in English. I am trying to display all dates in Swedish.
I have tried to hack the month names in the locale.php file but nothing happens. Any ideas what is wrong? Very grateful for help.
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
<div id="comment-<?php comment_ID(); ?>">
<div class="comment-body">
<div class="comment-meta commentmetadata">
<div class="commenter-info"><span class="commenter"><?php printf( __( '%s', 'mytheme' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?><br/></span><!-- commenter -->
<div class="comment-date">
<?php
/* translators: 1: date */
printf( __( '%1$s', 'mytheme' ), get_comment_date('j M Y H:i') ); ?><?php edit_comment_link( __( 'Edit →', 'mytheme' ), ' ' );
?>
</div><!-- comment-date -->
</div><!-- commenter-info -->
<div class="comment-gravatar"><?php echo get_avatar( $comment, 65 ); ?></div>
<span class="reply">
<?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
<a class="comment-reply-link" href="?replytocom=<?php comment_ID(); ?>#respond" onclick="return addComment.moveForm('comment-<?php comment_ID(); ?>', '<?php comment_ID(); ?>', 'respond', '<?php echo $post->ID; ?>')">Svara</a>
</span><!-- reply -->
</div><!-- .comment-meta .commentmetadata -->
<div class="comment-content">
<?php comment_text(); ?>
</div><!-- comment-content -->
<!-- comment reply link -->
<?php
if ( $comment->comment_parent ) {
$parent = get_comment( $comment->comment_parent );
$parent_link = esc_url( get_comment_link( $comment->comment_parent ) );
$date = DateTime::createFromFormat('Y-m-d H:i:s', $parent->comment_date);
$parent->comment_date = $date->format('j M Y H:i');
printf( '<span id="inreplyto">Svar till <a href="%1$s">%2$s %3$s</a></span>', $parent_link, $parent->comment_author, $parent->comment_date );
} ?>
Couldn’t actually find a solution to this, so I made a new wordpress install with the Swedish language version which solved the problem.