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

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

WordPress の翻訳

提供: WordPress Codex 日本語版
2005年1月29日 (土) 19:39時点におけるOtsukare (トーク)による版

(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先: 案内検索

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.

This page is about how to use the localization tools to teach your WordPress installation "to speak" in languages other than the default English.

WordPress in Your Language

There are (WP 1.2.x) translation files currently available for the following languages:

  • Arabic
  • Finnish
  • Formal Spanish
  • French
  • Hebrew
  • Bahasa Indonesian
  • Japanese
  • Czech
  • Danish
  • German
  • Dutch
  • Swedish
  • Italian
  • Hindi
  • Brazilian Portuguese
  • Traditional Chinese
  • Simplified Chinese
  • Vietnamese
  • Russian
  • Norvegian bokmal

Installing a Translation File

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

  • Download the .mo file for your language. As you probably noticed the naming convention of the .mo 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 country and 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:
define ('WPLANG', '');

Edit this line according to the .mo file you've just downloaded, e.g. for the Portuguese spoken in Brazil you must add:

define ('WPLANG', 'pt_BR');
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 .po file and customize/personalize the translation, but at the end you need to save it and create a new .mo 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.

Off-site Projects

WordPress has some localized sites that will support you in your mother tongue (if available)

Technical Implementation

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.