Traducción de la Fecha de WordPress a Español
Traducción versión 3.0.1 o superior:
Este post esta actualizado a WordPress 3.0.1
El día de hoy les traigo la traducción de la fecha de WordPress al Español sin usar ningún plugin, solo editando el archivo locale.php de tu WordPress. Pueden descargar la versión de WordPress en Español pero la fecha de su plantilla seguirá estando en inglés y esto es porque el WordPress en Español solo traduce el Panel de Administración así que les traigo la solución. Esta traducción del locale.php es para WordPress 3.0.1. El archivo locale.php se encuentra en la carpeta wp-includes/ del directorio donde se encuentran los archivos de tu WordPress
.
Bueno este post se divide en 3 partes:
El Procedimiento de Edición – para que aprendan como hacerlo, esto es solo en la versión mas reciente (WordPress 3.0.1).
La Descarga del Archivo – por si se hacen pelotas en el camino o quieren evitar tecnicismos para saltarse la primera parte jeje
(Descarga para la versión WordPress 3.0.1 o superior).
Y finalmente el Formato de Fecha – para que lo implementen en la plantilla/template/diseño/theme/tema de su blog.
Nota: Recuerden hacer respaldo de su archivo locale.php por si algo les falla.
Procedimiento de Edición:
Primero que nada extraemos el archivo locale.php el cual tiene la siguiente ruta /wp-includes/locale.php y lo abrimos en su editor de texto/html favorito (ya sea Front Page, Dreamweaver, el Bloc de Notas, gedit, geany, Notepad++ o el que usen).
-Ahora bien vamos a la línea 108 a 114 y tenemos lo siguiente:
$this->weekday[0] = /* translators: weekday */ __('Sunday');
$this->weekday[1] = /* translators: weekday */ __('Monday');
$this->weekday[2] = /* translators: weekday */ __('Tuesday');
$this->weekday[3] = /* translators: weekday */ __('Wednesday');
$this->weekday[4] = /* translators: weekday */ __('Thursday');
$this->weekday[5] = /* translators: weekday */ __('Friday');
$this->weekday[6] = /* translators: weekday */ __('Saturday');
*Lo cambiamos por esto:
$this->weekday[0] = /* translators: weekday */ __('Domingo');
$this->weekday[1] = /* translators: weekday */ __('Lunes');
$this->weekday[2] = /* translators: weekday */ __('Martes');
$this->weekday[3] = /* translators: weekday */ __('Miércoles');
$this->weekday[4] = /* translators: weekday */ __('Jueves');
$this->weekday[5] = /* translators: weekday */ __('Viernes');
$this->weekday[6] = /* translators: weekday */ __('Sábado');
*Nota: é y á es la forma HTML de escribir la e acentuada (é) y la a acentuada (á) respectivamente y están escritas de este modo para que sea codificado correctamente al ser llamado a la plantilla
.
-Ahora editamos la línea 118 a 124 que tiene algo asi:
$this->weekday_initial[__('Sunday')] = /* translators: one-letter abbreviation of the weekday */ __('S_Sunday_initial');
$this->weekday_initial[__('Monday')] = /* translators: one-letter abbreviation of the weekday */ __('M_Monday_initial');
$this->weekday_initial[__('Tuesday')] = /* translators: one-letter abbreviation of the weekday */ __('T_Tuesday_initial');
$this->weekday_initial[__('Wednesday')] = /* translators: one-letter abbreviation of the weekday */ __('W_Wednesday_initial');
$this->weekday_initial[__('Thursday')] = /* translators: one-letter abbreviation of the weekday */ __('T_Thursday_initial');
$this->weekday_initial[__('Friday')] = /* translators: one-letter abbreviation of the weekday */ __('F_Friday_initial');
$this->weekday_initial[__('Saturday')] = /* translators: one-letter abbreviation of the weekday */ __('S_Saturday_initial');
*Y lo cambiamos por esto:
$this->weekday_initial[__('Domingo')] = /* translators: one-letter abbreviation of the weekday */ __('D_Domingo_initial');
$this->weekday_initial[__('Lunes')] = /* translators: one-letter abbreviation of the weekday */ __('L_Lunes_initial');
$this->weekday_initial[__('Martes')] = /* translators: one-letter abbreviation of the weekday */ __('Ma_Martes_initial');
$this->weekday_initial[__('Miércoles')] = /* translators: one-letter abbreviation of the weekday */ __('Mi_Miércoles_initial');
$this->weekday_initial[__('Jueves')] = /* translators: one-letter abbreviation of the weekday */ __('J_Jueves_initial');
$this->weekday_initial[__('Viernes')] = /* translators: one-letter abbreviation of the weekday */ __('V_Viernes_initial');
$this->weekday_initial[__('Sábado')] = /* translators: one-letter abbreviation of the weekday */ __('S_Sábado_initial');
-Vamos a la línea 131 a 137 que contiene esto:
$this->weekday_abbrev[__('Sunday')] = /* translators: three-letter abbreviation of the weekday */ __('Sun');
$this->weekday_abbrev[__('Monday')] = /* translators: three-letter abbreviation of the weekday */ __('Mon');
$this->weekday_abbrev[__('Tuesday')] = /* translators: three-letter abbreviation of the weekday */ __('Tue');
$this->weekday_abbrev[__('Wednesday')] = /* translators: three-letter abbreviation of the weekday */ __('Wed');
$this->weekday_abbrev[__('Thursday')] = /* translators: three-letter abbreviation of the weekday */ __('Thu');
$this->weekday_abbrev[__('Friday')] = /* translators: three-letter abbreviation of the weekday */ __('Fri');
$this->weekday_abbrev[__('Saturday')] = /* translators: three-letter abbreviation of the weekday */ __('Sat');
*Lo sustituimos por esto:
$this->weekday_abbrev[__('Domingo')] = /* translators: three-letter abbreviation of the weekday */ __('Dom');
$this->weekday_abbrev[__('Lunes')] = /* translators: three-letter abbreviation of the weekday */ __('Lun');
$this->weekday_abbrev[__('Martes')] = /* translators: three-letter abbreviation of the weekday */ __('Mar');
$this->weekday_abbrev[__('Miércoles')] = /* translators: three-letter abbreviation of the weekday */ __('Mié');
$this->weekday_abbrev[__('Jueves')] = /* translators: three-letter abbreviation of the weekday */ __('Jue');
$this->weekday_abbrev[__('Viernes')] = /* translators: three-letter abbreviation of the weekday */ __('Vie');
$this->weekday_abbrev[__('Sábado')] = /* translators: three-letter abbreviation of the weekday */ __('Sáb');
-Ahora la línea 140 a 151:
$this->month['01'] = /* translators: month name */ __('January');
$this->month['02'] = /* translators: month name */ __('February');
$this->month['03'] = /* translators: month name */ __('March');
$this->month['04'] = /* translators: month name */ __('April');
$this->month['05'] = /* translators: month name */ __('May');
$this->month['06'] = /* translators: month name */ __('June');
$this->month['07'] = /* translators: month name */ __('July');
$this->month['08'] = /* translators: month name */ __('August');
$this->month['09'] = /* translators: month name */ __('September');
$this->month['10'] = /* translators: month name */ __('October');
$this->month['11'] = /* translators: month name */ __('November');
$this->month['12'] = /* translators: month name */ __('December');
*Lo cambiamos por esto:
$this->month['01'] = /* translators: month name */ __('Enero');
$this->month['02'] = /* translators: month name */ __('Febrero');
$this->month['03'] = /* translators: month name */ __('Marzo');
$this->month['04'] = /* translators: month name */ __('Abril');
$this->month['05'] = /* translators: month name */ __('Mayo');
$this->month['06'] = /* translators: month name */ __('Junio');
$this->month['07'] = /* translators: month name */ __('Julio');
$this->month['08'] = /* translators: month name */ __('Agosto');
$this->month['09'] = /* translators: month name */ __('Septiembre');
$this->month['10'] = /* translators: month name */ __('Octubre');
$this->month['11'] = /* translators: month name */ __('Noviembre');
$this->month['12'] = /* translators: month name */ __('Diciembre');
-Por último la línea 157 a 168:
$this->month_abbrev[__('January')] = /* translators: three-letter abbreviation of the month */ __('Jan_January_abbreviation');
$this->month_abbrev[__('February')] = /* translators: three-letter abbreviation of the month */ __('Feb_February_abbreviation');
$this->month_abbrev[__('March')] = /* translators: three-letter abbreviation of the month */ __('Mar_March_abbreviation');
$this->month_abbrev[__('April')] = /* translators: three-letter abbreviation of the month */ __('Apr_April_abbreviation');
$this->month_abbrev[__('May')] = /* translators: three-letter abbreviation of the month */ __('May_May_abbreviation');
$this->month_abbrev[__('June')] = /* translators: three-letter abbreviation of the month */ __('Jun_June_abbreviation');
$this->month_abbrev[__('July')] = /* translators: three-letter abbreviation of the month */ __('Jul_July_abbreviation');
$this->month_abbrev[__('August')] = /* translators: three-letter abbreviation of the month */ __('Aug_August_abbreviation');
$this->month_abbrev[__('September')] = /* translators: three-letter abbreviation of the month */ __('Sep_September_abbreviation');
$this->month_abbrev[__('October')] = /* translators: three-letter abbreviation of the month */ __('Oct_October_abbreviation');
$this->month_abbrev[__('November')] = /* translators: three-letter abbreviation of the month */ __('Nov_November_abbreviation');
$this->month_abbrev[__('December')] = /* translators: three-letter abbreviation of the month */ __('Dec_December_abbreviation');
*La modificamos poniendo lo siguiente:
$this->month_abbrev[__('Enero')] = /* translators: three-letter abbreviation of the month */ __('Ene_Enero_abbreviation');
$this->month_abbrev[__('Febrero')] = /* translators: three-letter abbreviation of the month */ __('Feb_Febrero_abbreviation');
$this->month_abbrev[__('Marzo')] = /* translators: three-letter abbreviation of the month */ __('Mar_Marzo_abbreviation');
$this->month_abbrev[__('Abril')] = /* translators: three-letter abbreviation of the month */ __('Abr_Abril_abbreviation');
$this->month_abbrev[__('Mayo')] = /* translators: three-letter abbreviation of the month */ __('May_Mayo_abbreviation');
$this->month_abbrev[__('Junio')] = /* translators: three-letter abbreviation of the month */ __('Jun_Junio_abbreviation');
$this->month_abbrev[__('Julio')] = /* translators: three-letter abbreviation of the month */ __('Jul_Julio_abbreviation');
$this->month_abbrev[__('Agosto')] = /* translators: three-letter abbreviation of the month */ __('Ago_Agosto_abbreviation');
$this->month_abbrev[__('Septiembre')] = /* translators: three-letter abbreviation of the month */ __('Sep_Septiembre_abbreviation');
$this->month_abbrev[__('Octubre')] = /* translators: three-letter abbreviation of the month */ __('Oct_Octubre_abbreviation');
$this->month_abbrev[__('Noviembre')] = /* translators: three-letter abbreviation of the month */ __('Nov_Noviembre_abbreviation');
$this->month_abbrev[__('Diciembre')] = /* translators: three-letter abbreviation of the month */ __('Dic_Diciembre_abbreviation');
Y listo! Guardamos los cambios y volvemos a subir nuestro archivo locale.php a nuestra carpeta wp-includes/ reemplazando al locale.php que ya esta en el servidor y eso es todo
. Espero que les sirva y más que nada no le tengan miedo a moverle a su archivo locale.php para que así tenga una idea de que hacer en futuras versiones y así poder editarlo ustedes solitos
.
Descarga del Archivo
Por si no fui muy claro con esta explicación, les dejo el locale.php, lo comprimí en .rar y esta listo con la traducción nadamas para que lo suban a la carpeta wp-includes/ de su wordpress.
CLICK AQUÍ PARA DESCARGAR locale.php EN ESPAÑOL (Versión para WordPress 3.0.1)
Formatos de Fecha
Aquí les pondré como funciona y que significa cada letra en el tema de su WordPress para que le den formato a su gusto:
Ahora vamos a ver el significado de las letras mas básicas:
d=Día del mes, 2 dígitos con ceros iniciales: 01 a 31
D=Representación textual de un día, tres letras: Lun a Dom
j=Día del mes sin ceros iniciales: 1 a 31
l=Representación textual completa del día de la semana: Lunes a Domingo
S=Sufijo original EN INGLÉS del día del mes, 2 caracteres: st, nd, rd o th. No sale en español y no le veo la utilidad xD
F=Representación textual completa de un mes: Enero a Diciembre
m=Representación numérica de un mes, con ceros iniciales: 01 a 12
n=Representación numérica de un mes, sin ceros iniciales: 1 a 12
M=Representación textual corta de un mes, tres letras: Ene a Dic
Y=Representación numérica completa de un año, 4 dígitos: ejemplo, 1999 ó 2008
y=Representación de dos dígitos de un año: ejemplo, 99 ó 08
\=Escapa caracteres especiales: ejemplo, \h\o\l\a imprimiría hola
Bueno eso es lo básico, si quieren ver más formatos para fecha en php den click aquí. les dejo unos ejemplos recomendados:
l j \d\e F \d\e\l Y\. == día número_de_día de Mes del año.
Ejemplo de lo que devuelve: lunes 13 de Septiembre del 2010.
l j \d\e F \d\e Y\. == día número_de_día de Mes de año.
Ejemplo de lo que devuelve: lunes 13 de Septiembre de 2010.
F j \d\e\l Y\. == Mes número_de_día del año.
Ejemplo de lo que devuelve: Septiembre 13 del 2010.
F j \d\e Y\. == Mes número_de_día de año.
Ejemplo de lo que devuelve: Septiembre 13 de 2010.
Espero les sea de utilidad
. Cualquier duda, comentario y/o sugerencia pueden postearla en la seccion de comentarios.
Link Corto:
Facebook
Twitter
Google Buzz
Digg
Delicious



