RSS de categorías

TV Internautas

Cambiar el idioma de los días de la semana y los meses (locale.php) en WordPress

locale.php (carpeta wp-includes de WordPress)
Cuando instalas WordPress, los días de la semana y los meses de tus posts, comentarios y del calendario aparecen en inglés. Aunque no pasa nada, sería mejor tenerlo todo en castellano ¿no?

Para ello, tan sólo tienes que modificar el archivo locale.php, el cual está ubicado en la carpeta wp-includes. No te dejes ningún apóstrofe (‘ ‘) o no te funcionará el blog hasta que lo arregles. Si no te apetece cambiarlo a mano, y como he visto en un post (http://www.seoprofesional.com/como-cambiar-los-idiomas-de-los-meses-y-dias-en-wordpress/) del blog SEOPROFESIONAL, adjunto el archivo locale.php ya traducido (no tiene ningún secreto), pero esta vez lo adjunto en este mismo post en modo texto (desde el post no he podido bajarlo).

Cópialo al bloc de notas, renómbralo a locale.php (extensión Todos los archivos) y súbelo a al carpeta wp-includes de tu servidor. Aquí va:

Archivo locale.php:

< ?php
// Date and Time

// The Weekdays
$weekday[0] = __(‘domingo’);
$weekday[1] = __(‘lunes’);
$weekday[2] = __(‘martes’);
$weekday[3] = __(‘miércoles’);
$weekday[4] = __(‘jueves’);
$weekday[5] = __(‘viernes’);
$weekday[6] = __(‘sábado’);

// 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_domingo_initial’);
$weekday_initial[__('lunes')]    = __(‘L_lunes_initial’);
$weekday_initial[__('martes')]   = __(‘M_martes_initial’);
$weekday_initial[__('miércoles')] = __(‘MI_miércoles_initial’);
$weekday_initial[__('jueves')]  = __(‘J_jueves_initial’);
$weekday_initial[__('viernes')]    = __(‘V_viernes_initial’);
$weekday_initial[__('sábado')]  = __(‘S_sábado_initial’);

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[__('miércoles')] = __(‘mie’);
$weekday_abbrev[__('jueves')]  = __(‘jue’);
$weekday_abbrev[__('viernes')]    = __(‘vie’);
$weekday_abbrev[__('sábado')]  = __(‘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'] = __(‘November’);
$month['12'] = __(‘Diciembre’);

// Abbreviations for each month. Uses the same hack as above to get around the
// ‘Mayo’ duplication.
$month_abbrev[__('Enero')] = __(‘ene_Enero_abbreviation’);
$month_abbrev[__('Febrero')] = __(‘feb_Febrero_abbreviation’);
$month_abbrev[__('Marzo')] = __(‘mar_Marzo_abbreviation’);
$month_abbrev[__('Abril')] = __(‘abr_Abril_abbreviation’);
$month_abbrev[__('Mayo')] = __(‘may_Mayo_abbreviation’);
$month_abbrev[__('Junio')] = __(‘jun_Junio_abbreviation’);
$month_abbrev[__('Julio')] = __(‘jul_Julio_abbreviation’);
$month_abbrev[__('Agosto')] = __(‘ago_Agosto_abbreviation’);
$month_abbrev[__('Septiembre')] = __(‘sep_Septiembre_abbreviation’);
$month_abbrev[__('Octubre')] = __(‘oct_Octubre_abbreviation’);
$month_abbrev[__('November')] = __(‘nov_November_abbreviation’);
$month_abbrev[__('Diciembre')] = __(‘dic_Diciembre_abbreviation’);

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

?>

Related Posts with Thumbnails
Comparte y disfruta:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • BarraPunto
  • Bitacoras.com
  • Slashdot
  • StumbleUpon
  • email
  • Blogplay
  • Technorati
  • Yahoo! Bookmarks
  • LinkedIn
  • PDF
  • RSS
  • Twitter
  • Add to favorites
  • Meneame
  • Yahoo! Buzz

No hay entradas (posts) relacionados(as).

Related posts brought to you by Yet Another Related Posts Plugin.


Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>




Statcounter