アーカイブの年月日を英語表記にする

2010.05.09

1)『年』表記を消す
wp-includes/general-template.phpの821行目(ver.2.9.2の場合)

$text = sprintf(__(‘%1$s %2$d’), $wp_locale->get_month($arcresult->month), $arcresult->year); 部分を下記に変更

$text = sprintf((‘%1$s %2$d’), $wp_locale->get_month($arcresult->month), $arcresult->year);

どこがかわったかというと、
(%1$s %2$d)の前のアンダーバーを消した。

ほかにも
$text = sprintf(__(‘%1$s %2$d’), $wp_locale->get_month($arcresult->month), $arcresult->year);
※%1$s %2$dの間の半角スペースを2つにする
でもOK。

2)『月』表記を英語にする
wp-includes/locale.phpの140行目(ver.2.9.2の場合)

$this->month[’01’] = __(‘January’); 部分を下記に変更

$this->month[’01’] = ‘January’;

(12ヶ月分変更)

これで日本語に変換されなくなります。

コメントは受け付けていません。