• 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細

このWikiはいつでも誰でも編集できます

「WordPress の翻訳」の版間の差分

提供: WordPress Codex 日本語版
移動先: 案内検索
 
1行目: 1行目:
Internationalization and localization is what we call the efforts to make WordPress available for people who speak languages other than English. Sometimes internationalization is abbreviated as i18n and localization is abbreviated as l10n. Those abbreviations come from taking the first letter, the last letter, and the number of letters in between the two. Actually the two terms refer to the beginning and the end of the process: internationalization has to be done on the developers' end, while the localization means the translation and adaptation of the script to another language and culture. If you are interested in learning more about the technology used to make the WordPress internationalization possible you can visit the Localization Technology page.
+
{{Copyedit}}
<!-- should we change the title of that page to: Internationalization Technology? or what... -->
+
__TOC__
 +
「インターナショナリゼーション(国際化)」や「ローカライゼーション(現地化)」とは、WordPressを始めとするさまざまなソフトウェア、プロジェクトなどを、もともとのターゲットとする言語や地域以外のユーザーにも利用できるようにする試みのことです。
  
This page is about how to use the localization tools to teach your WordPress installation "to speak" in languages other than the default English.
+
プログラムのローカリゼーションには2つの側面があります。ひとつは、開発者側の面です。ここでの作業は、世界中のユーザーのために、各地の状況や言語に合わせてプログラムの内部やインターフェースをいずれ翻訳するための仕組みを整えておくことから始まります。最終的には、開発者の指定したフレームワークを使ってメッセージなどが翻訳されることにより、「ローカリゼーション」が完了します。
  
== WordPress in Your Language ==
+
WordPress は世界中で使用されていますが、このような人気を得ることができたのも翻訳に手を貸してくださったユーザーのみなさんのおかげです。このページでは、WordPressをローカライズするために必要なツールや手順についてご紹介します。
  
There are (WP 1.2.x) translation files currently available for the following languages:
+
== WordPressを翻訳する ==
  
* Arabic
+
WordPressの翻訳に足を踏み入れる前に、[http://codex.wordpress.org/WordPress_in_Your_Language WordPress in Your Language](英語)ページを確認して、「ロケール」がすでに存在していないか確認しましょう([http://codex.wordpress.org/WordPress_in_Your_Language#Japanese 日本語はすでに存在します])。
* Finnish
+
* Formal Spanish
+
* French
+
* Hebrew
+
* Bahasa Indonesian
+
* Japanese
+
* Czech
+
* Danish
+
* [http://doku.wordpress.de/Download_der_deutschen_Sprachdatei German]
+
* Dutch
+
* Swedish
+
* Italian
+
* Hindi
+
* Brazilian Portuguese
+
* Traditional Chinese
+
* Simplified Chinese
+
* Vietnamese
+
* Russian
+
* Norvegian bokmal
+
  
== Installing a Translation File ==
+
もし翻訳したいロケールが公式[http://svn.automattic.com/wordpress-i18n/ WordPressローカリゼーションレポジトリ]に見当たらない場合、[[Mailing_Lists#Polyglots|wp-polyglotsメーリングリスト]]に参加するのが一番良い初めの一歩でしょう。自己紹介をし、そのロケールをすでに翻訳し始めている人がいないか聞いてみましょう。
  
If you would like to use WordPress in another language than English, first check the list above whether a translation file is already available or not. If you found the language you are looking for that's great. (If you didn't you might consider reading the article about [[Translating WordPress]], and contributing to the localization efforts.)
+
=== 翻訳への参加資格 ===
  
=== Setting up WordPress for Localization ===
+
* 英語および翻訳する言語が十分に読み書きできること。それが不十分な場合、作業が困難になるのに加え、完成したローカリゼーションファイルはネイティブスピーカーにとって分かりにくいものになってしまいます。
 +
* PHPの知識があること。最適な方法でメッセージの翻訳を行うために、WordPressのコードを読まなければいけないこともあります。
 +
* 文法の知識があり、英語で書かれたメッセージの前後関係を理解する能力があること。
  
* Download the <tt>.mo</tt> file for your language. As you probably noticed the naming convention of the <tt>.mo</tt> files is based on the ISO-639 language code (e.g. ''pt'' for Portuguese) followed by the ISO-3166 country code (e.g. ''_PT'' for Portugal or ''_BR'' for Brazil). So if you see more language files for your language, select the one specific for your country. (A complete list of [http://www.gnu.org/software/gettext/manual/html_chapter/gettext_16.html#SEC222 country]  and [http://www.gnu.org/software/gettext/manual/html_chapter/gettext_15.html#SEC221 language] codes can be found in the gettext documentation.)
+
=== 「地域(ロケール)」について ===
* Open your config.php file in a text editor (remember: never use word processors like MS Word for editing the files!) and find this around line 15:
+
<pre>define ('WPLANG', '');</pre>
+
Edit this line according to the <tt>.mo</tt> file you've just downloaded, e.g. for the Portuguese spoken in Brazil you must add:
+
<pre>define ('WPLANG', 'pt_BR');</pre> then save it.
+
* Go to your installed WordPress (i.e. your server or your hosted account) and create a new directory (folder) in your /wp-includes directory and name it /languages. Upload the .mo file there.
+
* Don't forget to upload the modified config.php file into the WordPress root directory.
+
* Open your browser and go to your WordPress URI (address). It should display in the newly installed language.
+
* Additionally you can download the <tt>.po</tt> file and customize/personalize the translation, but at the end you need to save it and create a new <tt>.mo</tt> file. More about it on the [[Translating WordPress]] page.
+
  
Note. If there was an error in the steps above or you did not specified the correct langauge WordPress will default back to English.
+
'''ロケール'''とは、言語と地域の方言を組み合わせたもののことです。普通、「ポルトガル語(ポルトガル)」や「ポルトガル語(ブラジル)」というように、ロケールは国と対応しています。
  
== Making a Translation ==
+
翻訳するロケールは自由に選ぶことができます。例えばカナダ英語やオーストラリア英語のように、地域に独特な単語のつづり方や慣用句似合わせた翻訳なども可能です。
  
If you are fluent in English and another language, creating a translation of WordPress is a fantastic way to contribute to the project and spread the goodness of WordPress. You can read more about this on the  [[Translating WordPress]] page.
+
WordPressの基準ロケールは米国英語です。
  
== Off-site Projects ==
+
== ローカライゼーション技術 ==
  
WordPress has some localized sites that will support you in your mother tongue (if available)
+
Wordpressは[http://www.gnu.org/software/gettext/gettext.html GNU Gettext]ローカリゼーションフレームワークを使っています。Gettextは成熟しており、ソフトウェアのモジュール形式の翻訳に広く使われているフレームワークです。
* [http://wordpress.de/ WordPress.de] is the home of the German WordPress Documentation Effort, hosting the documentation (work in progress), a board and the WP Channel, which is gathering WP related information from several blogs.
+
* [http://weciti.com/cnwp WordPress in Chinese] is a Chinese WordPress community, helping eachother out and documenting in Chinese too.
+
* [http://wordpress.xwd.jp/ WordPress Japan] provides [http://wordpress.xwd.jp/wiki/ a wiki] and [http://phpbb.xwd.jp/ forums] in Japanese. It is also the home of the [http://wordpress.xwd.jp/dl/ bilingual WordPress distribution], based on WordPress 1.2 and modified by [http://cafelog.net/ Otsukare].
+
  
== Technical Implementation ==
+
<!-- ◆◆未翻訳◆◆
 +
Gettext uses ''message-level'' translation &mdash; that is, every "message" displayed to users is translated individually, whether it be a paragraph or a single word. Throughout WordPress, all messages are passed through two functions:
  
If you're interested in how WordPress made localization possible, or if you are a developer who wants to write code for WordPress in a localization-friendly manner, please see [[Localization Technology]].
+
; <tt>__($message)</tt> : Searches the localization module for the translation of <tt>$message</tt>, and passes the translation to the PHP <tt>return</tt> statement. If no translation is found for <tt>$message</tt>, it just returns <tt>$message</tt>.
 +
; <tt>_e($message)</tt> : Searches the localization module for the translation of <tt>$message</tt>, and passes the translation to the PHP <tt>echo</tt> statement. If no translation is found for <tt>$message</tt>, it just echoes <tt>$message</tt>.
 +
 
 +
<tt>__()</tt> is used when the message is passed as an argument to another function; <tt>_e()</tt> is used to write the message directly to the page.
 +
 
 +
=== Gettext ファイル ===
 +
 
 +
There are three types of files used in the Gettext translation framework. Depending on the tool you use to translate, you will need to be familiar with some or all of these files.
 +
 
 +
; POT (Portable Object Template) files : The first step in the localization process. A program is used to search through the WordPress source code and pick out every string passed to a <tt>__()</tt> or <tt>_e()</tt> function. This list is put together in a specially-formatted template file that will form the basis of all translations.
 +
 
 +
; PO (Portable Object) files : The second step in the localization process. Using the POT file as a template, the list of messages are translated and saved as a PO file.
 +
 
 +
; MO (Machine Object) files : The final step in the localization process. The PO file is run through a program that turns it into an optimized machine-readable binary file, which is the MO file. Compiling the translations to machine code makes the localized program much faster in retrieving the translations while it is running.
 +
-->
 +
 
 +
== 翻訳ツール ==
 +
 
 +
翻訳するために便利なツールをご紹介しますので、お好みの方法を選んでください。
 +
 
 +
<!-- ; [https://launchpad.ubuntu.com/rosetta/ The Rosetta Project] :The Ubuntu Linux project has a web site that allows you to translate messages without even looking at a PO or POT file, and export directly to a MO.
 +
 
 +
: ''Note: many translators have found Rosetta to be a good starting point, but once it comes time to proofread the entire list of translations, many have opted to switch hand-editing the PO file or using a program like poEdit or KBabel, since the Rosetta UI lacks a search feature and other things that become essential when proofreading and editing.'' -->
 +
 
 +
;[http://www.poedit.org/ poEdit]: WindowsおよびUNIX/Linux向けオープンソースのプログラム。簡単にMOファイルの作成を行えるGUIを持つ。
 +
 
 +
;[http://i18n.kde.org/tools/kbabel/ KBabel]: Linux向けのPO編集用オープンソースプログラム。
 +
 
 +
;[http://www.gnu.org/software/gettext/ GNU Gettext]: 公式Gettextツールパッケージ。POTファイル作成、POファイルへ編集、MOファイル作成用のコマンドラインツールを含む。
 +
 
 +
<!-- 現在行われていないようです
 +
=== Rosetta を使った翻訳 ===
 +
 
 +
# [http://www.ubuntulinux.org/join_form Create an account] on the Ubuntu Linux web site
 +
# [https://launchpad.ubuntu.com/+login Log in] to Rosetta
 +
# Click [https://launchpad.ubuntu.com/rosetta/prefs My Preferences]
 +
# Add your language and locale to '''My Languages''' and click Save
 +
# Go to the [https://launchpad.ubuntu.com/rosetta/products/wordpress/wordpress-1.5 WordPress translation repository]
 +
# Click your language and locale
 +
# Start translating!
 +
 
 +
When you are finished with your translation, you can export it as a PO or MO file if you like, by visiting the '''PO File Details''' page for your language and clicking on '''Export as PO file''' or '''Export as MO file'''.
 +
 
 +
:''Note: Many translators mistake the meaning of the &#8629; and &#8226; characters used in Rosetta. These are meant delineate the location of newlines and easy-to-miss spaces in the source message, respectively, and are are '''NOT''' to be entered literally in the translation. Just be sure that any place there's a &#8629; in the source message, you insert a corresponding newline into the translation. Likewise with &#8226; and a normal space.''
 +
-->
 +
=== poEdit を使った翻訳 ===
 +
 
 +
# [http://www.poedit.org/ poEdit]をダウンロード、インストールします。
 +
# [http://svn.automattic.com/wordpress-i18n/pot/trunk/wordpress.pot 公式 WordPress POTファイル] をダウンロードします。
 +
# POTファイルをpoEditで開きます。
 +
# まず最初に「ファイル>名前をつけて保存」を選択し、このPOTファイルを翻訳する言語のPOファイルとして保存しなおします。この際の名前のつけかたは、[[#WordPressローカライゼーションレポジトリ]]の項目を参考にしてください。
 +
# インターフェースは6つのパネルに分かれています。上部には現在の翻訳状況、右下には英語版と翻訳版のメッセージ、左下にはコメント欄があります。上部で翻訳したいメッセージを選択し、一番右下のパネルに対応する翻訳を記入していきます。
 +
# 翻訳が完了したら、「名前をつけて保存」を再度選択し、MOファイルを作成します。
 +
# 「ファイル>設定>編集」メニューから、保存時にいつでもMOファイルを自動生成するようにしておくこともできます。また、コメント欄を編集可能にする場合もここで変更できます。
 +
 
 +
'''関連情報'''
 +
*[http://homepage3.nifty.com/peterpan/Docs/poedit-help.html poEdit ヘルプ]
 +
*[http://wp.mmrt-jp.net/plugin-japanization-project/poedit/ poEdit 取扱説明書] (MMRT daily life)
 +
*[http://hucha.pindang.com/archives/10 poEditの使い方メモ] (hucha on blog)
 +
*[http://hiromasa.zone.ne.jp/blog/archives/452/ poEdit Windows 版インストール方法] (hiromasa.zone :o))
 +
 
 +
 
 +
=== KBabel を使った翻訳 ===
 +
 
 +
[http://kbabel.kde.org/ KBabel]とは、Unix系OSデスクトップ環境構築用ソフトウェアである[http://www.kde.org/ KED]に含まれているツールです。
 +
# [http://svn.automattic.com/wordpress-i18n/pot/trunk/wordpress.pot 公式 WordPress POTファイル] をダウンロードします。
 +
# POTファイルをKBabelで開きます。
 +
 
 +
詳しい使い方については、[http://www.kde.gr.jp/pukiwiki/ KBabel Wiki](日本語)が参考になります。
 +
 
 +
 
 +
=== Gettext ツールを使った翻訳 ===
 +
 
 +
[http://www.gnu.org/software/gettext/gettext.html Gettext]を使う場合、UNIX環境またはCygwinなどのUNIX互換環境が必要になります。
 +
# [http://svn.automattic.com/wordpress-i18n/pot/trunk/wordpress.pot 公式 WordPress POTファイル] をダウンロードします。
 +
# POTファイルをお好きなテキストエディタで開きます。
 +
# ヘッダー情報(以下参照)を更新します。
 +
# メッセージを翻訳します。
 +
# ファイルの拡張子を「.po」に変更して保存します。
 +
# 以下を実行します。<tt>msgfmt -o ''filename''.mo ''filename''.po</tt>
 +
 
 +
'''関連情報'''
 +
*[http://sohda.net/cygwin/ Cygwin を使う。] - Windows上でGNUの開発ツールなどUNIXのツールを使えるようにするソフト、Cygwinの日本語解説。
 +
*[http://mput.dip.jp/osx/?date=20030508 Mac OS X インストールメモ - gettext]- Mac OS X上でのGettextのインストール手順。
 +
 
 +
 
 +
==== POファイルのヘッダー情報 ====
 +
 
 +
<!-- At the beginning of the PO file is something called the ''header''. This gives information about what package and version the translation is for, who the translator was, and when it was created. Certain portions of this header should be universal for all WordPress translations:
 +
-->
 +
 
 +
# '''LANGUAGE (LOCALE) translation for WordPress.'''
 +
# Copyright (C) '''YEAR WordPress contributors.'''
 +
# This file is distributed under the same license as the '''WordPress''' package.
 +
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
 +
#
 +
#, fuzzy
 +
msgid ""
 +
msgstr ""
 +
"Project-Id-Version: '''WordPress VERSION'''\n"
 +
"Report-Msgid-Bugs-To: \n"
 +
"POT-Creation-Date: 2005-02-27 17:11-0600\n"
 +
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 +
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 +
"Language-Team: LANGUAGE <LL@li.org>\n"
 +
"MIME-Version: 1.0\n"
 +
"Content-Type: text/plain; charset=CHARSET\n"
 +
"Content-Transfer-Encoding: 8bit\n"
 +
 
 +
大文字で書かれた部分を適切な内容に変更しましょう。
 +
 
 +
==== メッセージの形式 ====
 +
 
 +
これ以降のファイル内容は以下のようになっています。
 +
 
 +
#: wp-comments-post.php:13
 +
msgid "Sorry, comments are closed for this item."
 +
msgstr ""
 +
 +
#: wp-comments-post.php:29
 +
msgid "Sorry, you must be logged in to post a comment."
 +
msgstr ""
 +
 +
#: wp-comments-post.php:35
 +
msgid "Error: please fill the required fields (name, email)."
 +
msgstr ""
 +
 
 +
<!-- The first line of each message contains the location of the message in the WordPress code. In the case of these messages, they're all located in wp-comments-post.php, on lines 13, 29, and 35, respectively. Occasionally you will come across a message for which you will need to check its context; look at the appropriate line or lines in the WordPress core, and you should be able to figure out when and where the message is displayed, and even reproduce it yourself using your web browser.
 +
 
 +
The next line, <tt>msgid</tt>, is the ''source'' message. This is the string that WordPress passes to its <tt>__()</tt> or <tt>_e()</tt> functions, and the message you will need to translate.
 +
 
 +
The final line, <tt>msgstr</tt>, is a blank string where you will fill in your translation.
 +
-->
 +
 
 +
'''[http://svn.automattic.com/wordpress-i18n/fr_FR/trunk/messages/fr_FR.po フランス語(フランス)]''' ロケールの場合の実際の内容です。
 +
 
 +
#: wp-comments-post.php:13
 +
msgid "Sorry, comments are closed for this item."
 +
msgstr "'''L'ajout de commentaire n'est pas ou plus possible pour cet article.'''"
 +
 +
#: wp-comments-post.php:29
 +
msgid "Sorry, you must be logged in to post a comment."
 +
msgstr "'''Vous devez &ecirc;tre connect&eacute; pour r&eacute;diger un commentaire.'''"
 +
 +
#: wp-comments-post.php:35
 +
msgid "Error: please fill the required fields (name, email)."
 +
msgstr "'''Erreur : veuillez remplir les champs obligatoires vides (nom, e-mail).'''"
 +
 
 +
<!-- :''Note: see '''[[#Character_encodings|Character encodings]]''' and '''[[#HTML_character_entities|HTML character entities]]''' below for notes on when to use HTML character entities in translation.'' -->
 +
 
 +
== メッセージのタイプ ==
 +
 
 +
=== ラベル ===
 +
 
 +
'''Labels''' are often used in the context of HTML <tt>&lt;label&gt;</tt>, <tt>&lt;legend&gt;</tt>, <tt>&lt;a&gt;</tt>, or <tt>&lt;select&gt;</tt> tags. They are short and precise descriptors of the purpose of a UI element. These can be very difficult to translate at times, especially if they are single words, and if the word used in English can be interpreted as either a noun or imperative verb. With most '''labels''' you will need to do some searching through the code to find the context of its use before coming up with an appropriate translation.
 +
 
 +
Because so many of the messages are part of the WordPress administration interface, '''Labels''' are probably the most frequent type of message to translate.
 +
 
 +
'''例'''
 +
 
 +
msgid "Post"
 +
msgstr "Artikkeli"
 +
 
 +
''"Post" could be interpreted as an imperative verb, but in this context it's a noun. The noun form of "post" in English can be difficult to translate, and the most appropriate translation has been difficult for some teams to decide upon. Many translations use their language's equivalent to the English "Article," as this one does. <small>(From the '''[http://svn.automattic.com/wordpress-i18n/fi_FI/trunk/messages/fi_FI.po Finnish (Finland)]''' translation.)</small>''
 +
 
 +
#: wp-login.php:79 wp-login.php:233 wp-register.php:166
 +
#: wp-includes/template-functions-general.php:46
 +
msgid "Register"
 +
msgstr "&#2352;&#2332;&#2367;&#2360;&#2381;&#2335;&#2352;"
 +
 
 +
''<small>From the '''Hindi''' translation.</small>''
 +
 
 +
#: wp-admin/admin-functions.php:357
 +
msgid "- Select -"
 +
msgstr " - Dewis -"
 +
 
 +
''Items like the surrounding dashes in this example can be eliminated or replaced if they might be confusing to users in your target locale, or if there are different established conventions for your locale. <small>From the '''Welsh''' translation.</small>''
 +
 
 +
=== お知らせメッセージ ===
 +
 
 +
Another frequent type of message, the '''informational message''' is usually composed of full sentences, and conveys information or requests an action of the user. Since these tend to be longer than '''labels''', they tend to be slightly easier to translate. However, with the longer messages comes more variation in the level of formality (or informality), which is something translators need to be aware of.
 +
 
 +
'''例'''
 +
 
 +
#: wp-login.php:146
 +
msgid "Your new password is in the mail."
 +
msgstr "&#1042;&#1072;&#1096;&#1072;&#1090;&#1072; &#1085;&#1086;&#1074;&#1072; &#1087;&#1072;&#1088;&#1086;&#1083;&#1072; &#1077; &#1074; &#1077;&#1083;&#1077;&#1082;&#1090;&#1088;&#1086;&#1085;&#1085;&#1072;&#1090;&#1072; &#1074;&#1080; &#1087;&#1086;&#1097;&#1072;."
 +
 
 +
''This particular message contains a modified English formulaic expression ("the check/cheque is in the mail"), which contributes to its informality. <small>(From the '''[http://svn.automattic.com/wordpress-i18n/bg_BG/trunk/messages/bg_BG.po Bulgarian (Bulgaria)]''' translation.)</small>''
 +
 
 +
#: wp-includes/functions.php:1636
 +
msgid "&lt;strong&gt;Error&lt;/strong&gt;: Incorrect password."
 +
msgstr "&lt;strong&gt;FEL&lt;/strong&gt;: Felaktigt l&ouml;senord."
 +
 
 +
''Error messages tend to be more formal, simply because they're short and concise. <small>(From the '''[http://svn.automattic.com/wordpress-i18n/sv_SE/trunk/messages/sv_SE.po Swedish (Sweden)]''' translation.)</small>''
 +
 
 +
#: wp-includes/functions-post.php:467
 +
msgid "Sorry, you can only post a new comment once every 15 seconds. Slow down cowboy."
 +
msgstr "Leider kannst du nur alle 15 Sekunden einen neuen Kommentar eingeben. Immer locker bleiben."
 +
 
 +
''Of course, not all of them. <small>(From the '''[http://svn.automattic.com/wordpress-i18n/de_DE/trunk/messages/de_DE.po German (Germany)]''' translation.)</small>''
 +
 
 +
=== 地域ごとの日時設定 ===
 +
 
 +
Rather than using PHP's built-in locale switching features, which on is not configured for very many languages on most hosts, WordPress uses the same Gettext translation module to accomplish date and time translations and formatting.
 +
 
 +
WordPress translates the following:
 +
 
 +
==== 月 ====
 +
 
 +
#: wp-includes/locale.php:42 wp-includes/locale.php:57
 +
msgid "May"
 +
msgstr "Kvト孚en"
 +
 
 +
''<small>(From the '''[http://svn.automattic.com/wordpress-i18n/cs_CZ/trunk/messages/cs_CZ.po Czech (Czech Republic)]''' translation.)</small>''
 +
 
 +
==== 月の略称 ====
 +
 
 +
#: wp-includes/locale.php:57
 +
msgid "May_May_abbreviation"
 +
msgstr "Mag"
 +
 
 +
''Note the unusual <tt>msgid</tt>. These messages should '''NOT''' be translated literally: they are a hack to get around the fact that in English, the full name and abbreviation for May are the same, which Gettext would erroneously combine into one entry. <small>(From the '''[http://svn.automattic.com/wordpress-i18n/it_IT/trunk/messages/it_IT.po Italian (Italy)]''' translation.)</small>''
 +
 
 +
==== 曜日 ====
 +
 
 +
#: wp-includes/locale.php:7
 +
#: wp-includes/locale.php:18
 +
#: wp-includes/locale.php:31
 +
msgid "Tuesday"
 +
msgstr "&#28779;&#26332;&#26085;"
 +
 
 +
''<small>(From the '''[http://svn.automattic.com/wordpress-i18n/ja_JP/trunk/messages/ja_JP.po Japanese (Japan)]''' translation.)</small>''
 +
 
 +
==== 曜日の略称 ====
 +
 
 +
#: wp-includes/locale.php:31
 +
msgid "Tue"
 +
msgstr "&#1059;&#1090;&#1086;"
 +
 
 +
''<small>(From the '''[http://svn.automattic.com/wordpress-i18n/sr_CS/trunk/messages/sr_CS.po Serbian (Serbia &amp; Montenegro) (Cyrillic)]''' translation.)</small>''
 +
 
 +
==== 曜日のイニシャル ====
 +
 
 +
#: wp-includes/locale.php:18
 +
msgid "T_Tuesday_initial"
 +
msgstr "ti"
 +
 
 +
''The weekday initials are for WordPress's calendar feature, and use the same hack as the month abbreviations to get around the fact that in English Tuesday and Thursday share the same first letter. Not all locales use single-letter abbreviations for all days: in this example, Norwegian Bokm&aring;l uses an extra letter to distinguish ''tirsdag'' (Tuesday) and ''torsdag'' (Thursday). <small>(From the '''[http://svn.automattic.com/wordpress-i18n/nb_NO/trunk/messages/nb_NO.po Norwegian Bokm&aring;l (Norway)]''' translation.)</small>''
 +
 
 +
==== 文字列のフォーマット ====
 +
 
 +
These are [http://php.net/date PHP <tt>date()</tt>] formatting strings, and they allow you to change the formatting of the date and time for your locale.
 +
 
 +
WordPress uses the translations elsewhere in the localization file for month names, weekday names, etc. This special string is for the selection of which elements to include in the date &amp; time, as well as the order in which they're presented.
 +
 
 +
Take this <tt>msgid</tt> from the <tt>theme.pot</tt> file:
 +
 
 +
#: archive.php:40 search.php:19 single.php:22
 +
msgid "l, F jS, Y"
 +
msgstr ""
 +
 
 +
In English, this gets formatted as:
 +
 
 +
Sunday, February 27th, 2005
 +
 
 +
However, different locales format their dates differently. In Danish, for example, dates are written:
 +
 
 +
s&oslash;ndag, 27. februar 2005
 +
 
 +
To accomplish this, the <tt>msgid</tt> above would be translated to:
 +
 
 +
#: archive.php:40 search.php:19 single.php:22
 +
msgid "l, F jS, Y"
 +
msgstr "l, j. F Y"
 +
 
 +
To use another example, one way to format dates in Chinese and Japanese is as follows:
 +
 
 +
2005&#24180;2&#26376;27&#26085;
 +
 
 +
This would be accomplished in the translation like this:
 +
 
 +
#: archive.php:40 search.php:19 single.php:22
 +
msgid "l, F jS, Y"
 +
msgstr "Y&#24180;n&#26376;j&#26085;"
 +
 
 +
Lastly, if you need to include literal alphabetic characters in your date format, as sometimes occurs in Spanish, you can backslash them:
 +
 
 +
#: archive.php:40 search.php:19 single.php:22
 +
msgid "l, F jS, Y"
 +
msgstr "l j \d\e F \d\e Y "
 +
 
 +
This would output:
 +
 
 +
domingo 27 de febrero de 2005
 +
 
 +
==== WordPress-PHP を通じた翻訳 ====
 +
 
 +
To translate your Date e.g. inside your plugin use the wp-function [http://code.wordpress.de/xref/nav.htm?wp-includes/functions.php.htm#mysql2date mysql2date(Dateformat, Datestring)]. It uses the month- and week-translations to return your date.
 +
 
 +
=== 代替値を含むメッセージ ===
 +
 
 +
Many messages contain special PHP formatting placeholders, which allow the insertion of untranslatable dynamic content into the message after it is translated. The PHP placeholders come in two different formats:
 +
 
 +
; <tt>%s</tt> : When only one placeholder is present, this marker is used.
 +
; <tt>%1$s</tt>, <tt>%2$s</tt>, <tt>%3$s</tt>, &hellip; : Numbered placeholders, which allow translations to rearrange the order of the placeholders in the string while maintaining the information each is replaced with.
 +
 
 +
'''例'''
 +
 
 +
#: wp-login.php:116
 +
msgid "The e-mail was sent successfully to %s's e-mail address."
 +
msgstr "El e-mail fue enviado satisfactoriamente a la direcci&oacute;n e-mail de %s"
 +
 
 +
''This message inserts the username of the user to which an email has been sent. ('''[http://svn.automattic.com/wordpress-i18n/es_ES/trunk/messages/es_ES.po スペイン語(スペイン)]'''翻訳より。)''
 +
 
 +
#: wp-admin/upload.php:96
 +
#, php-format
 +
msgid "File %1$s of type %2$s is not allowed."
 +
msgstr "&#31867;&#22411;&#20026;%2$s&#30340;&#25991;&#20214;%1$s&#19981;&#20801;&#35768;&#34987;&#19978;&#20256;&#12290;"
 +
 
 +
''This message reverses the order in which the file name and type are used in the translation. ('''[http://svn.automattic.com/wordpress-i18n/zh_CN/trunk/messages/zh_CN.po 中国語(中国語)]'''翻訳より。)''
 +
 
 +
== 上手な翻訳をするためのヒント ==
 +
 
 +
;Don't translate literally, translate organically :Being bi- or multi-lingual, you undoubtedly know that the languages you speak have different structures, rhythms, tones, and inflections. Translated messages don't need to be structured the same way as the English ones: take the ideas that are presented and come up with a message that expresses the same thing in a natural way for the target language. It's the difference between creating an ''equal'' message and an ''equivalent'' message: don't replicate, replace. Even with more structural items in messages, you have creative license to adapt and change if you feel it will be more logical for, or better adapted to, your target audience.
 +
 
 +
;Try to keep the same level of formality (or informality) :Each message has a different level of formality or informality. Exactly what level of formality or informality to use for each message in your target language is something you'll have to figure out on your own (or with your team), but WordPress messages (''informational messages'' in particular) tend to have a politely informal tone in English. Try to accomplish the equivalent in the target language, within your cultural context.
 +
 
 +
;Don't use slang or audience-specific terms :Some amount of terminology is to be expected in a blog, but refrain from using colloquialisms that only the "in" crowd will get. If the uninitiated blogger were to install WordPress in your language, would they know what the term means? Words like ''pingback'', ''trackback'', and ''feed'' are exceptions to this rule; they're terminology that are typically difficult to translate, and many translators choose to leave in English.
 +
 
 +
;Read other software's localizations in your language :If you get stuck or need direction, try reading through the translations of other popular software tools to get a feel for what terms are commonly used, how formality is addressed, etc. Of course, WordPress has its own tone and feel, so keep that in mind when you're reading other localizations, but feel free to dig up UI terms and the like to maintain consistency with other software in your language.
 +
 
 +
== WordPressローカライゼーションレポジトリ ==
 +
 
 +
「'''ローカライゼーションレポジトリ'''」は、WordPressの公式翻訳版を管理している[[http://subversion.tigris.org/ Subversion]]レポジトリです。さまざまなチームが協力して母国語の翻訳を行っており、チーム内の管理者がレポジトリにあるファイルの更新を担っています。
 +
 
 +
=== 参加者募集中! ===
 +
 
 +
Participation in the repository is open to anyone. Simply subscribe to the [[Mailing_Lists#Polyglots|wp-polyglots mailing list]], introduce yourself, and let everyone know what translation you'd like to work on. If there is already a team for your language and locale, they'll let you know and you can join them. If not, you can either volunteer to be a maintainer for your language and locale, or simply contribute your localization and the repository maintainers will add it.
 +
 
 +
=== 手引きと必須事項 ===
 +
 
 +
''Note: these guidelines are subject to change as the system evolves; repository maintainers will be happy to assist you in updating the files you maintain in the repository should these guidelines change.''
 +
 
 +
==== 文字エンコード ====
 +
 
 +
All localizations should have at least a UTF-8 version, but may optionally add versions in other character encodings popular for that locale.
 +
 
 +
PHP does not support Byte Order Markers (BOMs), so be sure the UTF-8 encoded files you contribute do not have them.
 +
 
 +
==== HTML実体参照文字 ====
 +
 
 +
With a few exceptions (noted below), all translations should be written literally, rather than escaping accented and special characters with HTML character entities.
 +
 
 +
Some characters must be escaped to avoid conflict with XHTML markup: angle brackets (<tt>&amp;lt;</tt> and <tt>&amp;gt;</tt>), and ampersands (<tt>&amp;amp;</tt>). In addition, there are a few other characters better used escaped, such as non-breaking spaces (<tt>&amp;nbsp;</tt>), angle quotes (<tt>&amp;laquo;</tt> and <tt>&amp;raquo;</tt>), curly apostrophes (<tt>&amp;#8217;</tt>) and curly quotes.
 +
 
 +
For more information about the W3C's best practices involving character encodings and character entities, see the following references:
 +
 
 +
* http://www.w3.org/TR/2004/WD-i18n-html-tech-char-20040509/#IDAPNGO
 +
* http://www.w3.org/International/tutorials/tutorial-char-enc/#exceptional
 +
 
 +
==== レポジトリ内のファイル構成 ====
 +
 
 +
The repository contains directories for each locale, which are named as follows:
 +
 
 +
* [http://en.wikipedia.org/wiki/ISO_639 ISO 639 language code] (lowercase)
 +
* an underscore
 +
* [http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 ISO 3166-1 alpha-2 country code] (uppercase)
 +
* If the directory is a variation in script for the same locale, an @ sign, plus the [http://www.unicode.org/iso15924/iso15924-codes.html ISO 15924 script code].
 +
 
 +
Within each locale's directory are the regular Subversion versioning directories: branches/, tags/, and trunk/.
 +
 
 +
Inside the appropriate versioning directory are the following subdirectories:
 +
 
 +
'''dist/'''
 +
 
 +
This directory contains all files in the WordPress distribution that cannot be Gettexted, which have been translated into the target locale.
 +
 
 +
If the locale has only a UTF-8 translation of the files, the dist/ directory may be populated with them directly, and the structure within dist should mirror the structure of the wordpress root directory:
 +
 
 +
<ul>
 +
<li>dist/
 +
<ul>
 +
<li>license.html</li>
 +
<li>readme.html</li>
 +
<li>wp-config-sample.php</li>
 +
<li>&hellip;</li>
 +
<li>wp-admin/
 +
<ul>
 +
<li>install.php</li>
 +
<li>upgrade.php</li>
 +
<li>&hellip;</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
 
 +
ロケールがUTF-8文字コード以外のファイルを含む場合、dist/ ディレクトリには各文字コードごとのサブディレクトリが必要になります。以下は、その例です。
 +
 
 +
<ul>
 +
<li>dist/
 +
<ul>
 +
<li>UTF-8/
 +
<ul>
 +
<li>license.html</li>
 +
<li>readme.html</li>
 +
<li>wp-config-sample.php</li>
 +
<li>&hellip;</li>
 +
<li>wp-admin/
 +
<ul>
 +
<li>install.php</li>
 +
<li>upgrade.php</li>
 +
<li>&hellip;</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
<li>ISO-8859-1/
 +
<ul>
 +
<li>&hellip;</li>
 +
</ul>
 +
</li>
 +
<li>&hellip;</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
 
 +
'''messages/'''
 +
 
 +
このディレクトリには、各ロケール用のGettextのMO/POファイルは含まれます。メッセージファイルは以下のように名前がつけられています。
 +
 
 +
* [http://en.wikipedia.org/wiki/ISO_639 ISO 639 言語コード] (半角小文字)
 +
* アンダースコア(_)
 +
* [http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 ISO 3166-1 alpha-2 国コード] (半角大文字)
 +
* ピリオド(.)
 +
* [http://www.iana.org/assignments/character-sets IANA 文字セット名] (UTF-8以外の場合のみ)
 +
* ピリオド(.)(文字セット名を指定した場合のみ)
 +
* ファイル拡張子 (半角小文字)
 +
 
 +
'''Examples:'''
 +
cs_CZ.po        # UTF-8の文字コード
 +
ja_JP.EUC-JP.mo # EUC-JPの文字コード
 +
 
 +
'''theme/'''
 +
 
 +
Similarly to the dist/ dir, theme/ contains hard-translated theme files. If only a UTF-8 translation is present, the directory can be populated with subdirectories for each theme translated. These subdirectories contain all of the same files as the original theme (except that they're translated), and are named the same as the original theme:
 +
 
 +
<ul>
 +
<li>theme/
 +
<ul>
 +
<li>default/
 +
<ul>
 +
<li>404.php</li>
 +
<li>index.php</li>
 +
<li>sidebar.php</li>
 +
<li>&hellip;</li>
 +
<li>images/
 +
<ul>
 +
<li>&hellip;</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
 
 +
Just as with the dist/ directory, if there are multiple character encodings represented, theme/ should contain a subdirectory for each character encoding, which in turn would contain subdirectories for each theme translated.
 +
 
 +
<!-- Rosettaの説明は省きます
 +
== トラブルシューティング ==
 +
 
 +
; Rosetta won't export my translation as an MO file. It just says, "A system error occurred." :There is a syntax error in your translation that is preventing it from compiling to an MO. Download the PO instead and try compiling it manually with <tt>msgfmt</tt>. This will tell you which lines the errors are on so you can correct them by hand. If you don't have the GNU Gettext package installed, you can try opening the PO file in poEdit or KBabel to see if they will help you correct the errors, or you can email the [[Mailing_Lists#Polyglots|wp-polyglots mailing list]] and ask for someone to debug it for you.
 +
-->
 +
 
 +
[[Category:Translating WordPress]]
 +
[[Category:Advanced Topics]]
 +
[[Category:WordPress Development]]

2006年10月8日 (日) 13:44時点における版

この記事は翻訳時に編集が必要であるとマークされていました。その為Codex原文が大きく編集されている可能性があります。内容を確認される際は原文を参照していただき、可能であれば本項目へ反映させてください。よりよいCodexを作成するためのお手伝いをお願いします。

「インターナショナリゼーション(国際化)」や「ローカライゼーション(現地化)」とは、WordPressを始めとするさまざまなソフトウェア、プロジェクトなどを、もともとのターゲットとする言語や地域以外のユーザーにも利用できるようにする試みのことです。

プログラムのローカリゼーションには2つの側面があります。ひとつは、開発者側の面です。ここでの作業は、世界中のユーザーのために、各地の状況や言語に合わせてプログラムの内部やインターフェースをいずれ翻訳するための仕組みを整えておくことから始まります。最終的には、開発者の指定したフレームワークを使ってメッセージなどが翻訳されることにより、「ローカリゼーション」が完了します。

WordPress は世界中で使用されていますが、このような人気を得ることができたのも翻訳に手を貸してくださったユーザーのみなさんのおかげです。このページでは、WordPressをローカライズするために必要なツールや手順についてご紹介します。

WordPressを翻訳する

WordPressの翻訳に足を踏み入れる前に、WordPress in Your Language(英語)ページを確認して、「ロケール」がすでに存在していないか確認しましょう(日本語はすでに存在します)。

もし翻訳したいロケールが公式WordPressローカリゼーションレポジトリに見当たらない場合、wp-polyglotsメーリングリストに参加するのが一番良い初めの一歩でしょう。自己紹介をし、そのロケールをすでに翻訳し始めている人がいないか聞いてみましょう。

翻訳への参加資格

  • 英語および翻訳する言語が十分に読み書きできること。それが不十分な場合、作業が困難になるのに加え、完成したローカリゼーションファイルはネイティブスピーカーにとって分かりにくいものになってしまいます。
  • PHPの知識があること。最適な方法でメッセージの翻訳を行うために、WordPressのコードを読まなければいけないこともあります。
  • 文法の知識があり、英語で書かれたメッセージの前後関係を理解する能力があること。

「地域(ロケール)」について

ロケールとは、言語と地域の方言を組み合わせたもののことです。普通、「ポルトガル語(ポルトガル)」や「ポルトガル語(ブラジル)」というように、ロケールは国と対応しています。

翻訳するロケールは自由に選ぶことができます。例えばカナダ英語やオーストラリア英語のように、地域に独特な単語のつづり方や慣用句似合わせた翻訳なども可能です。

WordPressの基準ロケールは米国英語です。

ローカライゼーション技術

WordpressはGNU Gettextローカリゼーションフレームワークを使っています。Gettextは成熟しており、ソフトウェアのモジュール形式の翻訳に広く使われているフレームワークです。


翻訳ツール

翻訳するために便利なツールをご紹介しますので、お好みの方法を選んでください。


poEdit: WindowsおよびUNIX/Linux向けオープンソースのプログラム。簡単にMOファイルの作成を行えるGUIを持つ。
KBabel: Linux向けのPO編集用オープンソースプログラム。
GNU Gettext: 公式Gettextツールパッケージ。POTファイル作成、POファイルへ編集、MOファイル作成用のコマンドラインツールを含む。

poEdit を使った翻訳

  1. poEditをダウンロード、インストールします。
  2. 公式 WordPress POTファイル をダウンロードします。
  3. POTファイルをpoEditで開きます。
  4. まず最初に「ファイル>名前をつけて保存」を選択し、このPOTファイルを翻訳する言語のPOファイルとして保存しなおします。この際の名前のつけかたは、#WordPressローカライゼーションレポジトリの項目を参考にしてください。
  5. インターフェースは6つのパネルに分かれています。上部には現在の翻訳状況、右下には英語版と翻訳版のメッセージ、左下にはコメント欄があります。上部で翻訳したいメッセージを選択し、一番右下のパネルに対応する翻訳を記入していきます。
  6. 翻訳が完了したら、「名前をつけて保存」を再度選択し、MOファイルを作成します。
  7. 「ファイル>設定>編集」メニューから、保存時にいつでもMOファイルを自動生成するようにしておくこともできます。また、コメント欄を編集可能にする場合もここで変更できます。

関連情報


KBabel を使った翻訳

KBabelとは、Unix系OSデスクトップ環境構築用ソフトウェアであるKEDに含まれているツールです。

  1. 公式 WordPress POTファイル をダウンロードします。
  2. POTファイルをKBabelで開きます。

詳しい使い方については、KBabel Wiki(日本語)が参考になります。


Gettext ツールを使った翻訳

Gettextを使う場合、UNIX環境またはCygwinなどのUNIX互換環境が必要になります。

  1. 公式 WordPress POTファイル をダウンロードします。
  2. POTファイルをお好きなテキストエディタで開きます。
  3. ヘッダー情報(以下参照)を更新します。
  4. メッセージを翻訳します。
  5. ファイルの拡張子を「.po」に変更して保存します。
  6. 以下を実行します。msgfmt -o filename.mo filename.po

関連情報


POファイルのヘッダー情報

# LANGUAGE (LOCALE) translation for WordPress.
# Copyright (C) YEAR WordPress contributors.
# This file is distributed under the same license as the WordPress package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: WordPress VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-02-27 17:11-0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

大文字で書かれた部分を適切な内容に変更しましょう。

メッセージの形式

これ以降のファイル内容は以下のようになっています。

#: wp-comments-post.php:13
msgid "Sorry, comments are closed for this item."
msgstr ""

#: wp-comments-post.php:29
msgid "Sorry, you must be logged in to post a comment."
msgstr ""

#: wp-comments-post.php:35
msgid "Error: please fill the required fields (name, email)."
msgstr ""


フランス語(フランス) ロケールの場合の実際の内容です。

#: wp-comments-post.php:13
msgid "Sorry, comments are closed for this item."
msgstr "L'ajout de commentaire n'est pas ou plus possible pour cet article."

#: wp-comments-post.php:29
msgid "Sorry, you must be logged in to post a comment."
msgstr "Vous devez être connecté pour rédiger un commentaire."

#: wp-comments-post.php:35
msgid "Error: please fill the required fields (name, email)."
msgstr "Erreur : veuillez remplir les champs obligatoires vides (nom, e-mail)."


メッセージのタイプ

ラベル

Labels are often used in the context of HTML <label>, <legend>, <a>, or <select> tags. They are short and precise descriptors of the purpose of a UI element. These can be very difficult to translate at times, especially if they are single words, and if the word used in English can be interpreted as either a noun or imperative verb. With most labels you will need to do some searching through the code to find the context of its use before coming up with an appropriate translation.

Because so many of the messages are part of the WordPress administration interface, Labels are probably the most frequent type of message to translate.

msgid "Post"
msgstr "Artikkeli"

"Post" could be interpreted as an imperative verb, but in this context it's a noun. The noun form of "post" in English can be difficult to translate, and the most appropriate translation has been difficult for some teams to decide upon. Many translations use their language's equivalent to the English "Article," as this one does. (From the Finnish (Finland) translation.)

#: wp-login.php:79 wp-login.php:233 wp-register.php:166
#: wp-includes/template-functions-general.php:46
msgid "Register"
msgstr "रजिस्टर"

From the Hindi translation.

#: wp-admin/admin-functions.php:357
msgid "- Select -"
msgstr " - Dewis -"

Items like the surrounding dashes in this example can be eliminated or replaced if they might be confusing to users in your target locale, or if there are different established conventions for your locale. From the Welsh translation.

お知らせメッセージ

Another frequent type of message, the informational message is usually composed of full sentences, and conveys information or requests an action of the user. Since these tend to be longer than labels, they tend to be slightly easier to translate. However, with the longer messages comes more variation in the level of formality (or informality), which is something translators need to be aware of.

#: wp-login.php:146
msgid "Your new password is in the mail."
msgstr "Вашата нова парола е в електронната ви поща."

This particular message contains a modified English formulaic expression ("the check/cheque is in the mail"), which contributes to its informality. (From the Bulgarian (Bulgaria) translation.)

#: wp-includes/functions.php:1636
msgid "<strong>Error</strong>: Incorrect password."
msgstr "<strong>FEL</strong>: Felaktigt lösenord."

Error messages tend to be more formal, simply because they're short and concise. (From the Swedish (Sweden) translation.)

#: wp-includes/functions-post.php:467
msgid "Sorry, you can only post a new comment once every 15 seconds. Slow down cowboy."
msgstr "Leider kannst du nur alle 15 Sekunden einen neuen Kommentar eingeben. Immer locker bleiben."

Of course, not all of them. (From the German (Germany) translation.)

地域ごとの日時設定

Rather than using PHP's built-in locale switching features, which on is not configured for very many languages on most hosts, WordPress uses the same Gettext translation module to accomplish date and time translations and formatting.

WordPress translates the following:

#: wp-includes/locale.php:42 wp-includes/locale.php:57
msgid "May"
msgstr "Kvト孚en"

(From the Czech (Czech Republic) translation.)

月の略称

#: wp-includes/locale.php:57
msgid "May_May_abbreviation"
msgstr "Mag"

Note the unusual msgid. These messages should NOT be translated literally: they are a hack to get around the fact that in English, the full name and abbreviation for May are the same, which Gettext would erroneously combine into one entry. (From the Italian (Italy) translation.)

曜日

#: wp-includes/locale.php:7
#: wp-includes/locale.php:18
#: wp-includes/locale.php:31
msgid "Tuesday"
msgstr "火曜日"

(From the Japanese (Japan) translation.)

曜日の略称

#: wp-includes/locale.php:31
msgid "Tue"
msgstr "Уто"

(From the Serbian (Serbia & Montenegro) (Cyrillic) translation.)

曜日のイニシャル

#: wp-includes/locale.php:18
msgid "T_Tuesday_initial"
msgstr "ti"

The weekday initials are for WordPress's calendar feature, and use the same hack as the month abbreviations to get around the fact that in English Tuesday and Thursday share the same first letter. Not all locales use single-letter abbreviations for all days: in this example, Norwegian Bokmål uses an extra letter to distinguish tirsdag (Tuesday) and torsdag (Thursday). (From the Norwegian Bokmål (Norway) translation.)

文字列のフォーマット

These are PHP date() formatting strings, and they allow you to change the formatting of the date and time for your locale.

WordPress uses the translations elsewhere in the localization file for month names, weekday names, etc. This special string is for the selection of which elements to include in the date & time, as well as the order in which they're presented.

Take this msgid from the theme.pot file:

#: archive.php:40 search.php:19 single.php:22
msgid "l, F jS, Y"
msgstr ""

In English, this gets formatted as:

Sunday, February 27th, 2005

However, different locales format their dates differently. In Danish, for example, dates are written:

søndag, 27. februar 2005

To accomplish this, the msgid above would be translated to:

#: archive.php:40 search.php:19 single.php:22
msgid "l, F jS, Y"
msgstr "l, j. F Y"

To use another example, one way to format dates in Chinese and Japanese is as follows:

2005年2月27日

This would be accomplished in the translation like this:

#: archive.php:40 search.php:19 single.php:22
msgid "l, F jS, Y"
msgstr "Y年n月j日"

Lastly, if you need to include literal alphabetic characters in your date format, as sometimes occurs in Spanish, you can backslash them:

#: archive.php:40 search.php:19 single.php:22
msgid "l, F jS, Y"
msgstr "l j \d\e F \d\e Y "

This would output:

domingo 27 de febrero de 2005

WordPress-PHP を通じた翻訳

To translate your Date e.g. inside your plugin use the wp-function mysql2date(Dateformat, Datestring). It uses the month- and week-translations to return your date.

代替値を含むメッセージ

Many messages contain special PHP formatting placeholders, which allow the insertion of untranslatable dynamic content into the message after it is translated. The PHP placeholders come in two different formats:

%s 
When only one placeholder is present, this marker is used.
%1$s, %2$s, %3$s, … 
Numbered placeholders, which allow translations to rearrange the order of the placeholders in the string while maintaining the information each is replaced with.

#: wp-login.php:116
msgid "The e-mail was sent successfully to %s's e-mail address."
msgstr "El e-mail fue enviado satisfactoriamente a la dirección e-mail de %s"

This message inserts the username of the user to which an email has been sent. (スペイン語(スペイン)翻訳より。)

#: wp-admin/upload.php:96
#, php-format
msgid "File %1$s of type %2$s is not allowed."
msgstr "类型为%2$s的文件%1$s不允许被上传。"

This message reverses the order in which the file name and type are used in the translation. (中国語(中国語)翻訳より。)

上手な翻訳をするためのヒント

Don't translate literally, translate organically 
Being bi- or multi-lingual, you undoubtedly know that the languages you speak have different structures, rhythms, tones, and inflections. Translated messages don't need to be structured the same way as the English ones: take the ideas that are presented and come up with a message that expresses the same thing in a natural way for the target language. It's the difference between creating an equal message and an equivalent message: don't replicate, replace. Even with more structural items in messages, you have creative license to adapt and change if you feel it will be more logical for, or better adapted to, your target audience.
Try to keep the same level of formality (or informality) 
Each message has a different level of formality or informality. Exactly what level of formality or informality to use for each message in your target language is something you'll have to figure out on your own (or with your team), but WordPress messages (informational messages in particular) tend to have a politely informal tone in English. Try to accomplish the equivalent in the target language, within your cultural context.
Don't use slang or audience-specific terms 
Some amount of terminology is to be expected in a blog, but refrain from using colloquialisms that only the "in" crowd will get. If the uninitiated blogger were to install WordPress in your language, would they know what the term means? Words like pingback, trackback, and feed are exceptions to this rule; they're terminology that are typically difficult to translate, and many translators choose to leave in English.
Read other software's localizations in your language 
If you get stuck or need direction, try reading through the translations of other popular software tools to get a feel for what terms are commonly used, how formality is addressed, etc. Of course, WordPress has its own tone and feel, so keep that in mind when you're reading other localizations, but feel free to dig up UI terms and the like to maintain consistency with other software in your language.

WordPressローカライゼーションレポジトリ

ローカライゼーションレポジトリ」は、WordPressの公式翻訳版を管理している[Subversion]レポジトリです。さまざまなチームが協力して母国語の翻訳を行っており、チーム内の管理者がレポジトリにあるファイルの更新を担っています。

参加者募集中!

Participation in the repository is open to anyone. Simply subscribe to the wp-polyglots mailing list, introduce yourself, and let everyone know what translation you'd like to work on. If there is already a team for your language and locale, they'll let you know and you can join them. If not, you can either volunteer to be a maintainer for your language and locale, or simply contribute your localization and the repository maintainers will add it.

手引きと必須事項

Note: these guidelines are subject to change as the system evolves; repository maintainers will be happy to assist you in updating the files you maintain in the repository should these guidelines change.

文字エンコード

All localizations should have at least a UTF-8 version, but may optionally add versions in other character encodings popular for that locale.

PHP does not support Byte Order Markers (BOMs), so be sure the UTF-8 encoded files you contribute do not have them.

HTML実体参照文字

With a few exceptions (noted below), all translations should be written literally, rather than escaping accented and special characters with HTML character entities.

Some characters must be escaped to avoid conflict with XHTML markup: angle brackets (&lt; and &gt;), and ampersands (&amp;). In addition, there are a few other characters better used escaped, such as non-breaking spaces (&nbsp;), angle quotes (&laquo; and &raquo;), curly apostrophes (&#8217;) and curly quotes.

For more information about the W3C's best practices involving character encodings and character entities, see the following references:

レポジトリ内のファイル構成

The repository contains directories for each locale, which are named as follows:

Within each locale's directory are the regular Subversion versioning directories: branches/, tags/, and trunk/.

Inside the appropriate versioning directory are the following subdirectories:

dist/

This directory contains all files in the WordPress distribution that cannot be Gettexted, which have been translated into the target locale.

If the locale has only a UTF-8 translation of the files, the dist/ directory may be populated with them directly, and the structure within dist should mirror the structure of the wordpress root directory:

  • dist/
    • license.html
    • readme.html
    • wp-config-sample.php
    • wp-admin/
      • install.php
      • upgrade.php

ロケールがUTF-8文字コード以外のファイルを含む場合、dist/ ディレクトリには各文字コードごとのサブディレクトリが必要になります。以下は、その例です。

  • dist/
    • UTF-8/
      • license.html
      • readme.html
      • wp-config-sample.php
      • wp-admin/
        • install.php
        • upgrade.php
    • ISO-8859-1/

messages/

このディレクトリには、各ロケール用のGettextのMO/POファイルは含まれます。メッセージファイルは以下のように名前がつけられています。

Examples:

cs_CZ.po        # UTF-8の文字コード
ja_JP.EUC-JP.mo # EUC-JPの文字コード

theme/

Similarly to the dist/ dir, theme/ contains hard-translated theme files. If only a UTF-8 translation is present, the directory can be populated with subdirectories for each theme translated. These subdirectories contain all of the same files as the original theme (except that they're translated), and are named the same as the original theme:

  • theme/
    • default/
      • 404.php
      • index.php
      • sidebar.php
      • images/

Just as with the dist/ directory, if there are multiple character encodings represented, theme/ should contain a subdirectory for each character encoding, which in turn would contain subdirectories for each theme translated.