WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Translating WordPress

This introduction of this page has been moved to the Home Page of the Polyglots handbook. Most sections throughout this Codex article have also been moved. Please visit the Polyglots handbook for all your WordPress translating needs.


Translating WordPress

(This section has been moved to the Translation Basics page of the Polyglots handbook.)

Qualifications

(This section has been moved to the Translation Basics page of the Polyglots handbook.)

About Locales

A locale is a combination of language and regional dialect. Usually locales correspond to countries, as is the case with Portuguese (Portugal) and Portuguese (Brazil).

You can do a translation for any locale you wish, even other English locales such as Canadian English or Australian English, to adjust for regional spelling and idioms.

The default locale of WordPress is U.S. English.

Localization Technology

(This section has been moved to the Working with WordPress Core page of the Polyglots handbook.)

Translation Tools

(This section has been moved to the Translation Tools page of the Polyglots handbook.)

Translating With GlotPress

There is a page with instructions on how to translate with GlotPress, on the Getting Started guide.. If you don't see your language listed, please request its inclusion on the WP Polyglots blog.

Translating With Launchpad

We have a separate page with instructions for translating WordPress with Launchpad.

Translating With Pootle (at Locamotion.org)

  1. Register an account at the Pootle server, and send an e-mail to one of the admins to add your language
  2. Before trying to translate anything, remember to log in to Pootle. Content can sometimes be viewed and suggestions can sometimes be entered even if a visitor is not logged in, but one can only translate if logged in.
  3. Visit the WordPress page for your language. For example, the Afrikaans page is at pootle.locamotion.org/af/wordpress/ (remember the trailing slash).
  4. Click "Show Editing Functions".
  5. Click "Quick Translate" to edit only untranslated and fuzzy strings, or click "Translate All" to edit all strings.

For the purpose of translating WordPress at locamotion.org, the single wordpress.pot file has been split up into smaller logical units. The readme.html file is also available there, and so is a file containing all the strings that one would normally add to the PHP files manually.

Also take a look at the Decathlon wiki page for WordPress, here and here.

Merging your translations into wordpress.pot

Normally, with a Pootle server, the translator can download his chosen software's PO file at any time and submit it to his project. However, because the original source file has been split into smaller units at pootle.locamotion.org, translators must manually merge their translations back into the wordpress.pot file before submitting it to WordPress.

  1. Download the official WordPress POT file.
  2. Download the WordPress Continent POT file (Optional)
  3. Download and install the Translate Toolkit on your computer.
  4. Download the translated or partially translated PO files from the Pootle server. You can download them one by one or you can download them in a ZIP file (see options on the web site). Normally you don't need to be logged in at Poolte to download the PO files that translators in your language have translated.
  5. First, combine the PO files into a single translation memory (because it is easier to do subsequent steps with a single file than with several files), and execute the following from the command line: po2tmx -l xx -i pofiles -o xx.tmx where "xx" is your target language code. This will create a TMX translation memory file called xx.tmx.
  6. Second, pre-translate the WordPress POT file using the translation memory. To do this, execute the following from the command line: pot2po --tm=xx.tmx -i wordpress.pot -o wordpress_xx.po. This will create a PO file for your language called wordpress_xx.po.
  7. Lastly, do a word/string count on your PO file to see how much of it is translated, fuzzy and untranslated, using the following from the command line: pocount wordpress_xx.po

If all the PO files were 100% translated, the final wordpress_xx.po file will also be 100% translated. If some strings were not translated in the PO files, the pot2po command might cause some fuzzy translations in wordpress_xx.po (this is not a bad thing).

Translating With Poedit

(This section has been moved to the PoEdit page of the Translator's Handbook.)

Translating With KBabel

This section is incomplete.

  1. Download the official WordPress POT file
  2. Open the file in KBabel

Translating With Gettext Tools

(This section has been moved to the Gettext page of the Polyglots handbook.)

Types of messages

(This section has been moved to the Types of Messages page of the Polyglots handbook.)

Tips for Good Translations

(This section has been moved to General Expectations page of the Polyglots handbook.)

WordPress Localization Repository

(This section has been moved to Working with the Translation Repository page of the Polyglots handbook.)

Using Localizations

(This section has been moved to the Working with WordPress Core page of the Polyglots handbook.)

Troubleshooting

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 msgfmt. 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 wp-polyglots mailing list and ask for someone to debug it for you.

Resources