I am trying to set the date appear in the french way e.g "2 Mai" instead of "May 2"
here is my code:'
<?php // Get today's date in the right format
//$todaysDate = date('M d');
$todaysDate = date('m/d/Y H:i:s');
?>
<?php query_posts('showposts=5&category_name=events&meta_key=Date&meta_compare=>=&meta_value='.$todaysDate.'&orderby=meta_value=order=ASC'); ?>
<?php
if (have_posts()) : while (have_posts()) : the_post();
$eventMeta = get_post_meta($post->ID, 'Date', true);
$eventDate = strtotime($eventMeta);
$displayDate = date ('M d', $eventDate);?>
<ul>
<li>
<span class="date"><?php echo $displayDate ; ?></span>
<span><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></span>
</li>
<?php endwhile; else: ?>
<li><?php if ( (strtolower(ICL_LANGUAGE_CODE) == 'en') ) {echo("Sorry, no upcoming events for this month!");} ?>
<?php if ( (strtolower(ICL_LANGUAGE_CODE) == 'fr')) echo("Désolé, aucun événement à venir pour ce mois!") ?></li></ul>
<?php endif; ?>
How do I do it so that it switches the format depending on which language you are. To view the site click here