Traducir fechas en WP

Una de las pocas cosas que los de wordpress-es no pueden hacer (Limitaciones técnicas) es traducir las fechas, dejando un efecto bastante malo en la plantilla, afortunadamente, tiene una solución fácil, incluso desde el Tablero.

Paso 1

En el wp-admin pulsa en Manage/Files, y bajo Other Files escribe wp-includes/locale.php, si todo va bien, deberías tener las fechas en inglés, ahora solo tienes que traducirlas.

Ayudita

Si usas WP 2.0.1 (O uno superior debería valer), Aquí tienes el archivo completo para copiar y pegar

// Date and Time

// The Weekdays
$weekday[0] = __(’Domingo’);
$weekday[1] = __(’Lunes’);
$weekday[2] = __(’Martes’);
$weekday[3] = __(’Miercoles’);
$weekday[4] = __(’Jueves’);
$weekday[5] = __(’Viernes’);
$weekday[6] = __(’Sabado’);

// The first letter of each day. The _%day%_initial suffix is a hack to make
// sure the day initials are unique. They should be translated to a one
// letter initial.
$weekday_initial[__(’Domingo’)] = __(’D');
$weekday_initial[__(’lunes’)] = __(’L');
$weekday_initial[__(’Martes’)] = __(’M');
$weekday_initial[__(’Miercoles’)] = __(’M');
$weekday_initial[__(’Jueves’)] = __(’J');
$weekday_initial[__(’Viernes’)] = __(’V');
$weekday_initial[__(’Sabado’)] = __(’S');

foreach ($weekday_initial as $weekday_ => $weekday_initial_) {
$weekday_initial[$weekday_] = preg_replace(’/_.+_initial$/’, ”, $weekday_initial_);
}

// Abbreviations for each day.
$weekday_abbrev[__(’Domingo’)] = __(’Dom’);
$weekday_abbrev[__(’Lunes’)] = __(’Lun’);
$weekday_abbrev[__(’Martes’)] = __(’Mar’);
$weekday_abbrev[__(’Miercoles’)] = __(’Mie’);
$weekday_abbrev[__(’Jueves’)] = __(’Vue’);
$weekday_abbrev[__(’Viernes’)] = __(’Vie’);
$weekday_abbrev[__(’Sabado’)] = __(’Sab’);

// The Months
$month[’01′] = __(’Enero’);
$month[’02′] = __(’Febrero’);
$month[’03′] = __(’Marzo’);
$month[’04′] = __(’Abril’);
$month[’05′] = __(’Mayo’);
$month[’06′] = __(’Junio’);
$month[’07′] = __(’Julio’);
$month[’08′] = __(’Agosto’);
$month[’09′] = __(’Septiembre’);
$month[’10′] = __(’Octubre’);
$month[’11′] = __(’Noviembre’);
$month[’12′] = __(’Diciembre’);

// Abbreviations for each month. Uses the same hack as above to get around the
// ‘May’ duplication.
$month_abbrev[__(’January’)] = __(’Jan_January_abbreviation’);
$month_abbrev[__(’February’)] = __(’Feb_February_abbreviation’);
$month_abbrev[__(’March’)] = __(’Mar_March_abbreviation’);
$month_abbrev[__(’April’)] = __(’Apr_April_abbreviation’);
$month_abbrev[__(’May’)] = __(’May_May_abbreviation’);
$month_abbrev[__(’June’)] = __(’Jun_June_abbreviation’);
$month_abbrev[__(’July’)] = __(’Jul_July_abbreviation’);
$month_abbrev[__(’August’)] = __(’Aug_August_abbreviation’);
$month_abbrev[__(’September’)] = __(’Sep_September_abbreviation’);
$month_abbrev[__(’October’)] = __(’Oct_October_abbreviation’);
$month_abbrev[__(’November’)] = __(’Nov_November_abbreviation’);
$month_abbrev[__(’December’)] = __(’Dec_December_abbreviation’);

foreach ($month_abbrev as $month_ => $month_abbrev_) {
$month_abbrev[$month_] = preg_replace(’/_.+_abbreviation$/’, ”, $month_abbrev_);
}

Recuerda hacer un backup de dicho archivo por si pasase cualquier problema.

4 Comentarios, ¡Anímate!

  1. Posted 4 noviembre, 2006 at 5:27 pm |

    Muy bueno

  2. Posted 4 noviembre, 2006 at 7:16 pm |

    Realmente muy bueno. Menéotela…

  3. Posted 4 noviembre, 2006 at 8:52 pm |

    Increible, liam aun no se ha pasado!

  4. Posted 5 noviembre, 2006 at 12:09 pm |

    Oh, dios mio, has nombrado a LA EL INNOMBRABLE!

un Trackback

  1. Por meneame.net en 4 noviembre, 2006 a las 7:19 pm

    Traducir fechas en Wordpress 2.0.1 o superiores…

    Una de las pocas cosas que los de wordpress-es no pueden hacer (Limitaciones técnicas) es traducir las fechas, dejando un efecto bastante malo en el plantilla, afortunadamente, tiene una solución fácil, incluso desde el Tablero….

Escribe un comentario

Your email is never published nor shared. Los campos requeridos están marcados con *

*
*