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

Now it shows something like this:

  • March 2012
  • February 2012

But I want to show something like this

  • 03.2012
  • 02.2012

or something in Turkish like this

  • Mart 2012
  • Şubat 2012
share|improve this question

For archives you can use the get_archives_link filter like this:

add_filter('get_archives_link', 'translate_archive_month');
function translate_archive_month($list) {

  $patterns = array( 
    '/January/', '/February/', '/March/', '/April/', '/May/', '/June/',
    '/July/', '/August/', '/September/', '/October/',  '/November/', '/December/'

  $replacements = array( //PUT HERE WHATEVER YOU NEED
    '01.', '02.', '03.', '04.', '05.', '06.', 
    '07.', '08.', '09.', '10.', '11.', '12.'

  $list = preg_replace($patterns, $replacements, $list);
return $list; 

Hope it helps.

share|improve this answer

The WordPress Archive widget internally calls wp_get_archives(). You can find that function in wp-includes/general-template.php. On line 939 you find the applicable line:

/* translators: 1: month name, 2: 4-digit year */
$text = sprintf(__('%1$s %2$d'), $wp_locale->get_month($arcresult->month), $arcresult->year);

I see no filters that would allow you to change it to something like "03.2012" without changing the core files. However, if you just would like the month to show up in Turkish, it should only be a matter of defining WPLANG correctly in wp-config.php. Of course, you have to make sure you provide the language mo-file in your wp-content/languages/ directory.

share|improve this answer
thank you for the answer... my WPLANG defined tr_TR in the config file and I am using correct mo-file... But that file does not contain month names... – spinodal Mar 8 '12 at 15:13
Well, in that case, it is just a matter of updating your mo-file. codex.wordpress.org/Translating_WordPress – Geert Mar 8 '12 at 15:27
although I've added the month names to the file as described in the link you gave, it still is in English. I did not understand why? – spinodal Mar 9 '12 at 11:30

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.