この記事は最終更新日より 1 年以上経過しています。
画像やリンクが無効になっている可能性もあるのでご了承下さい。
画像やリンクが無効になっている可能性もあるのでご了承下さい。
記事名はどこかのぱくりです。
というか上記リンクの記事をみてからうちでも気になったポイントがいくつかあったのでやってみました。
PHP なファイルは一切手を着けないまた別の方法。
「/wp-content/languages/ja.po」という言語ファイルを書き換えることにした。
「.po」ファイルを書き換えて「.mo」に変換する。
「.mo」ファイルは「GNU message catalog」という名称みたい。
参考
$ file ja.po
ja.po: UTF-8 Unicode English text, with very long lines
ja.po: UTF-8 Unicode English text, with very long lines
ぶっちは自サバで直に編集かましたりあれこれ弄る人間なのでそのままサーバー上で編集。
先に「ja.{mo.po}」の 2 ファイルをバックアップ。
それから
$ vi ja.po
として必要箇所を書き換えて上げる。
終わったら
$ msgfmt -o ja.mo ./ja.po
で終わり。
いじょ。
私信。
エラーとんもこれするなら po ファイルメールずがんしてくれれば mo にして返すぽいよ? (笑
Win だと何かと面倒だそうでこれ。
以下、今回書き換えた所。備忘録で残しておきます。
$ diff -u ./backup/ja.po ./ja.po
--- ./backup/ja.po 2009-02-14 06:27:02.000000000 +0900
+++ ./ja.po 2009-04-05 22:03:46.000000000 +0900
@@ -9444,7 +9444,7 @@
#: wp-includes/general-template.php:767
#, php-format
msgid "%1$s %2$d"
-msgstr "%2$d 年 %1$s"
+msgstr "%2$d, %1$s"
#: wp-includes/general-template.php:964
#: wp-includes/widgets.php:1923
@@ -9455,13 +9455,13 @@
#: wp-includes/general-template.php:965
#, php-format
msgid "%1$s %2$s|Used as a calendar caption"
-msgstr "%2$s 年 %1$s|カレンダーのキャプションに使われます"
+msgstr "%2$s, %1$s|カレンダーのキャプションに使われます"
#: wp-includes/general-template.php:989
#: wp-includes/general-template.php:999
#, php-format
msgid "View posts for %1$s %2$s"
-msgstr "%2$s 年 %1$s の投稿を表示"
+msgstr "%2$s, %1$s の投稿を表示"
#: wp-includes/general-template.php:1660
msgid "« Previous"
@@ -9555,217 +9555,216 @@
#: wp-includes/locale.php:140
#: wp-includes/locale.php:155
msgid "January"
-msgstr "1 月"
+msgstr "January"
#: wp-includes/js/tinymce/langs/wp-langs.php:53
#: wp-includes/locale.php:141
#: wp-includes/locale.php:156
msgid "February"
-msgstr "2 月"
+msgstr "February"
#: wp-includes/js/tinymce/langs/wp-langs.php:53
#: wp-includes/locale.php:142
#: wp-includes/locale.php:157
msgid "March"
-msgstr "3 月"
+msgstr "March"
#: wp-includes/js/tinymce/langs/wp-langs.php:53
#: wp-includes/locale.php:143
#: wp-includes/locale.php:158
msgid "April"
-msgstr "4 月"
+msgstr "April"
#: wp-includes/js/tinymce/langs/wp-langs.php:53
#: wp-includes/locale.php:144
#: wp-includes/locale.php:159
msgid "May"
-msgstr "5 月"
+msgstr "May"
#: wp-includes/js/tinymce/langs/wp-langs.php:53
#: wp-includes/locale.php:145
#: wp-includes/locale.php:160
msgid "June"
-msgstr "6 月"
+msgstr "June"
#: wp-includes/js/tinymce/langs/wp-langs.php:53
#: wp-includes/locale.php:146
#: wp-includes/locale.php:161
msgid "July"
-msgstr "7 月"
+msgstr "July"
#: wp-includes/js/tinymce/langs/wp-langs.php:53
#: wp-includes/locale.php:147
#: wp-includes/locale.php:162
msgid "August"
-msgstr "8 月"
+msgstr "August"
#: wp-includes/js/tinymce/langs/wp-langs.php:53
#: wp-includes/locale.php:148
#: wp-includes/locale.php:163
msgid "September"
-msgstr "9 月"
+msgstr "September"
#: wp-includes/js/tinymce/langs/wp-langs.php:53
#: wp-includes/locale.php:149
#: wp-includes/locale.php:164
msgid "October"
-msgstr "10 月"
+msgstr "October"
#: wp-includes/js/tinymce/langs/wp-langs.php:53
#: wp-includes/locale.php:150
#: wp-includes/locale.php:165
msgid "November"
-msgstr "11 月"
+msgstr "November"
#: wp-includes/js/tinymce/langs/wp-langs.php:53
#: wp-includes/locale.php:151
#: wp-includes/locale.php:166
msgid "December"
-msgstr "12 月"
+msgstr "December"
#: wp-includes/js/tinymce/langs/wp-langs.php:54
#: wp-includes/locale.php:155
msgid "Jan_January_abbreviation"
-msgstr "1 月_January_abbreviation"
+msgstr "Jan_January_abbreviation"
#: wp-includes/js/tinymce/langs/wp-langs.php:54
#: wp-includes/locale.php:156
msgid "Feb_February_abbreviation"
-msgstr "2 月_February_abbreviation"
+msgstr "Feb_February_abbreviation"
#: wp-includes/js/tinymce/langs/wp-langs.php:54
#: wp-includes/locale.php:157
msgid "Mar_March_abbreviation"
-msgstr "3 月_March_abbreviation"
+msgstr "Mar_March_abbreviation"
#: wp-includes/js/tinymce/langs/wp-langs.php:54
#: wp-includes/locale.php:158
msgid "Apr_April_abbreviation"
-msgstr "4 月_April_abbreviation"
+msgstr "Apr_April_abbreviation"
#: wp-includes/js/tinymce/langs/wp-langs.php:54
#: wp-includes/locale.php:159
msgid "May_May_abbreviation"
-msgstr "5 月_May_abbreviation"
+msgstr "May_May_abbreviation"
#: wp-includes/js/tinymce/langs/wp-langs.php:54
#: wp-includes/locale.php:160
msgid "Jun_June_abbreviation"
-msgstr "6 月_June_abbreviation"
-
+msgstr "Jun_June_abbreviation"
#: wp-includes/js/tinymce/langs/wp-langs.php:54
#: wp-includes/locale.php:161
msgid "Jul_July_abbreviation"
-msgstr "7 月_July_abbreviation"
+msgstr "Jul_July_abbreviation"
#: wp-includes/js/tinymce/langs/wp-langs.php:54
#: wp-includes/locale.php:162
msgid "Aug_August_abbreviation"
-msgstr "8 月_August_abbreviation"
+msgstr "Aug_August_abbreviation"
#: wp-includes/js/tinymce/langs/wp-langs.php:54
#: wp-includes/locale.php:163
msgid "Sep_September_abbreviation"
-msgstr "9 月_September_abbreviation"
+msgstr "Sep_September_abbreviation"
#: wp-includes/js/tinymce/langs/wp-langs.php:54
#: wp-includes/locale.php:164
msgid "Oct_October_abbreviation"
-msgstr "10 月_October_abbreviation"
+msgstr "Oct_October_abbreviation"
#: wp-includes/js/tinymce/langs/wp-langs.php:54
#: wp-includes/locale.php:165
msgid "Nov_November_abbreviation"
-msgstr "11 月_November_abbreviation"
+msgstr "Nov_November_abbreviation"
#: wp-includes/js/tinymce/langs/wp-langs.php:54
#: wp-includes/locale.php:166
msgid "Dec_December_abbreviation"
-msgstr "12 月_December_abbreviation"
+msgstr "Dec_December_abbreviation"
#: wp-includes/js/tinymce/langs/wp-langs.php:55
#: wp-includes/locale.php:108
#: wp-includes/locale.php:118
#: wp-includes/locale.php:131
msgid "Sunday"
-msgstr "日曜日"
+msgstr "Sunday"
#: wp-includes/js/tinymce/langs/wp-langs.php:55
#: wp-includes/locale.php:109
#: wp-includes/locale.php:119
#: wp-includes/locale.php:132
msgid "Monday"
-msgstr "月曜日"
+msgstr "Monday"
#: wp-includes/js/tinymce/langs/wp-langs.php:55
#: wp-includes/locale.php:110
#: wp-includes/locale.php:120
#: wp-includes/locale.php:133
msgid "Tuesday"
-msgstr "火曜日"
+msgstr "Tuesday"
#: wp-includes/js/tinymce/langs/wp-langs.php:55
#: wp-includes/locale.php:111
#: wp-includes/locale.php:121
#: wp-includes/locale.php:134
msgid "Wednesday"
-msgstr "水曜日"
+msgstr "Wednesday"
#: wp-includes/js/tinymce/langs/wp-langs.php:55
#: wp-includes/locale.php:112
#: wp-includes/locale.php:122
#: wp-includes/locale.php:135
msgid "Thursday"
-msgstr "木曜日"
+msgstr "Thursday"
#: wp-includes/js/tinymce/langs/wp-langs.php:55
#: wp-includes/locale.php:113
#: wp-includes/locale.php:123
#: wp-includes/locale.php:136
msgid "Friday"
-msgstr "金曜日"
+msgstr "Friday"
#: wp-includes/js/tinymce/langs/wp-langs.php:55
#: wp-includes/locale.php:114
#: wp-includes/locale.php:124
#: wp-includes/locale.php:137
msgid "Saturday"
-msgstr "土曜日"
+msgstr "Saturday"
#: wp-includes/js/tinymce/langs/wp-langs.php:56
#: wp-includes/locale.php:131
msgid "Sun"
-msgstr "日"
+msgstr "Sun"
#: wp-includes/js/tinymce/langs/wp-langs.php:56
#: wp-includes/locale.php:132
msgid "Mon"
-msgstr "月"
+msgstr "Mon"
#: wp-includes/js/tinymce/langs/wp-langs.php:56
#: wp-includes/locale.php:133
msgid "Tue"
-msgstr "火"
+msgstr "Tue"
#: wp-includes/js/tinymce/langs/wp-langs.php:56
#: wp-includes/locale.php:134
msgid "Wed"
-msgstr "水"
+msgstr "Wed"
#: wp-includes/js/tinymce/langs/wp-langs.php:56
#: wp-includes/locale.php:135
msgid "Thu"
-msgstr "木"
+msgstr "Thu"
#: wp-includes/js/tinymce/langs/wp-langs.php:56
#: wp-includes/locale.php:136
msgid "Fri"
-msgstr "金"
+msgstr "Fri"
#: wp-includes/js/tinymce/langs/wp-langs.php:56
#: wp-includes/locale.php:137
msgid "Sat"
-msgstr "土"
+msgstr "Sat"
#: wp-includes/js/tinymce/langs/wp-langs.php:59
msgid "Print"
コメント
[…] 「.po」ファイルを書き換えて「.mo」に変換する方法が丁寧に紹介されています。 勿論こちらが正攻法。 迷わず行けよ!行けば分かるさ!! WordPress の月や曜日を英語表記に – ぶっちろぐ […]
これは素晴らしい!!!!
というかそもそもこの方法が正解なんだよなーw
moファイルにできるんならプラグインの日本語化もできちゃうのか。
まぁ大体のプラグインは日本語化するまでもなくなんとなくわかっちゃうけどそれが出来るって素敵な事やんかー。
また気が向いた時にpoファイルをこしらえて送っちゃうので、気が向いたらmoにしてくれると風水的にはいいようなので是非お願いします!
愛してる!!
»error
で、ふとプラグイン日本語化とかあるから自前で出来ればのぅーって探したら
Windows で po ファイル揉みし抱いて mo 出てくるプログラムみっけたよ (笑
Poedit
FTP で Upload がめんどいから俺は使わないけど (´・ω・)
po ファイルいつでもカモンヌだよん!!
[…] 「WordPress の月や曜日を英語表記に – ぶっちろぐ」 http://bucci.bp7.org/archives/2273 これを応用すれば、省略名は「1月」、フルスペルは「睦月」とか表示することも可能ですなw なんだか夢 […]
[…] wordressの月や曜日を英語表記に […]
[…] http://www.koikikukan.com/archives/2007/03/14-003001.php http://bucci.bp7.org/archives/2273 […]
[…] wordressの月や曜日を英語表記に このお二つの記事を参考にさせていただいて、「local.phpの日本語部分を英語に変更」「poeditデータの変換部分を任意の英 語に変更」してみました。です […]
[…] そして、ぶっちろぐさん、お世話になりました。 […]
[…] WordPress の月や曜日を英語表記に(ぶっちろぐ) […]
[…] ぶっちろぐ:WordPress の月や曜日を英語表記に […]