WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to use date_i18n() to display a localised date in my theme.

<?php echo date_i18n( 'F j, Y',  strtotime( get_the_time( "Y-m-d" ) ) ); ?>

However, this always returns the English version of the month, rather than the French version. I'm using wordpress as a network. My primary site has the default WPLANG (so english), and I'm setting the second site to french by setting the WPLANG to fr_FR in site-settings.

Other translations on the page are working fine, so wordpress is aware that the language is different.

I downloaded the necessary .mo and .po files for French, but it doesn't have months in there, so I assume there's somewhere else these are set/used.

Any help would be appreciated as I've been stumped by this for hours.

share|improve this question
up vote 2 down vote accepted

date_i18n() gets month from WP_Locale->get_month(). Which in turn fills months using baseline translation function __(), nothing fancy.

Bottom line is — months should be translated in po/mo files, you just got incomplete translation.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.