Você só vai usar esse código se o seu WordPress é em outra língua… por exemplo? Inglês. Se seu WordPress é em português, não precisa.
1. Abra o arquivo locale.php na pasta wp-includes do seu FTP do WordPress e troque tudo que tem lá por isso:
<?php
// Date and Time
class WP_Locale {
var $weekday;
var $weekday_initial;
var $weekday_abbrev;
var $month;
var $month_abbrev;
var $meridiem;
var $text_direction = 'ltr';
var $locale_vars = array('text_direction');
function init() {
// The Weekdays
$this->weekday[0] = __('Domingo');
$this->weekday[1] = __('Segunda-feira');
$this->weekday[2] = __('Terça-feira');
$this->weekday[3] = __('Quarta-feira');
$this->weekday[4] = __('Quinta-feira');
$this->weekday[5] = __('Sexta-feira');
$this->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.
$this->weekday_initial[__('Domingo')] = __('D_Domingo_initial');
$this->weekday_initial[__('Segunda-feira')] = __('S_Segunda-feira_initial');
$this->weekday_initial[__('Terça-feira')] = __('T_Terça-feira_initial');
$this->weekday_initial[__('Quarta-feira')] = __('W_Wednesday_initial');
$this->weekday_initial[__('Quinta-feira')] = __('Q_Quinta-feira_initial');
$this->weekday_initial[__('Sexta-feira')] = __('S_Sexta-feira_initial');
$this->weekday_initial[__('Sábado')] = __('S_Sábado_initial');
foreach ($this->weekday_initial as $weekday_ => $weekday_initial_) {
$this->weekday_initial[$weekday_] = preg_replace('/_.+_initial$/', '', $weekday_initial_);
}
// Abbreviations for each day.
$this->weekday_abbrev[__('Domingo')] = __('Dom');
$this->weekday_abbrev[__('Segunda-feira')] = __('Seg');
$this->weekday_abbrev[__('Terça-feira')] = __('Ter');
$this->weekday_abbrev[__('Quarta-feira')] = __('Qua');
$this->weekday_abbrev[__('Quinta-feira')] = __('Qui');
$this->weekday_abbrev[__('Sexta-feira')] = __('Sex');
$this->weekday_abbrev[__('Sábado')] = __('SSáb');
// The Months
$this->month['01'] = __('Janeiro');
$this->month['02'] = __('Fevereiro');
$this->month['03'] = __('Março');
$this->month['04'] = __('Abril');
$this->month['05'] = __('Maio');
$this->month['06'] = __('Junho');
$this->month['07'] = __('Julho');
$this->month['08'] = __('Agosto');
$this->month['09'] = __('Setembro');
$this->month['10'] = __('Outubro');
$this->month['11'] = __('Novembro');
$this->month['12'] = __('Dezembro');
// Abbreviations for each month. Uses the same hack as above to get around the
// 'May' duplication.
$this->month_abbrev[__('Janeiro')] = __('Jan_Janeiro_abbreviation');
$this->month_abbrev[__('Fevereiro')] = __('Fev_Fevereiro_abbreviation');
$this->month_abbrev[__('Março')] = __('Mar_Março_abbreviation');
$this->month_abbrev[__('Abril')] = __('Abr_Abril_abbreviation');
$this->month_abbrev[__('Maio')] = __('Mai_Maio_abbreviation');
$this->month_abbrev[__('Junho')] = __('Jun_Junho_abbreviation');
$this->month_abbrev[__('Julho')] = __('Jul_Julho_abbreviation');
$this->month_abbrev[__('Agosto')] = __('Ago_Agosto_abbreviation');
$this->month_abbrev[__('Setembro')] = __('Set_Setembro_abbreviation');
$this->month_abbrev[__('Outubro')] = __('Out_Outubro_abbreviation');
$this->month_abbrev[__('Novembro')] = __('Nov_Novembro_abbreviation');
$this->month_abbrev[__('Dezembro')] = __('Dez_Dezembro_abbreviation');
foreach ($this->month_abbrev as $month_ => $month_abbrev_) {
$this->month_abbrev[$month_] = preg_replace('/_.+_abbreviation$/', '', $month_abbrev_);
}
// The Meridiems
$this->meridiem['am'] = __('am');
$this->meridiem['pm'] = __('pm');
$this->meridiem['AM'] = __('AM');
$this->meridiem['PM'] = __('PM');
// Numbers formatting
// See http://php.net/number_format
$trans = _c('number_format_decimals|$decimals argument for http://php.net/number_format, default is 0');
$this->number_format['decimals'] = ('number_format_decimals' == $trans) ? 0 : $trans;
$trans = _c('number_format_decimal_point|$dec_point argument for http://php.net/number_format, default is .');
$this->number_format['decimal_point'] = ('number_format_decimal_point' == $trans) ? '.' : $trans;
$trans = _c('number_format_thousands_sep|$thousands_sep argument for http://php.net/number_format, default is ,');
$this->number_format['thousands_sep'] = ('number_format_thousands_sep' == $trans) ? ',' : $trans;
// Import global locale vars set during inclusion of $locale.php.
foreach ( $this->locale_vars as $var ) {
if ( isset($GLOBALS[$var]) )
$this->$var = $GLOBALS[$var];
}
}
function get_weekday($weekday_number) {
return $this->weekday[$weekday_number];
}
function get_weekday_initial($weekday_name) {
return $this->weekday_initial[$weekday_name];
}
function get_weekday_abbrev($weekday_name) {
return $this->weekday_abbrev[$weekday_name];
}
function get_month($month_number) {
return $this->month[zeroise($month_number, 2)];
}
function get_month_initial($month_name) {
return $this->month_initial[$month_name];
}
function get_month_abbrev($month_name) {
return $this->month_abbrev[$month_name];
}
function get_meridiem($meridiem) {
return $this->meridiem[$meridiem];
}
// Global variables are deprecated. For backwards compatibility only.
function register_globals() {
$GLOBALS['weekday'] = $this->weekday;
$GLOBALS['weekday_initial'] = $this->weekday_initial;
$GLOBALS['weekday_abbrev'] = $this->weekday_abbrev;
$GLOBALS['month'] = $this->month;
$GLOBALS['month_abbrev'] = $this->month_abbrev;
}
function WP_Locale() {
$this->init();
$this->register_globals();
}
}
?>
Código encontrado no True Luv e no blog do Gabriel Borges. Creditem eles também.
