How to translate SI Captcha Anti-Spam for WordPress

How to translate SI Captcha Anti-Spam for WordPress:

This article explains how to make a new language translation file when a translation in your language does not exist. See also: How to update a translation of SI Captcha Anti-Spam for WordPress

WordPress uses gettext files for language translation localization. There are three types of files used in the gettext translation framework. These files are used and/or generated by translation tools during the translation process, as follows:

POT (Portable Object Template) files
The first step in the localization process is that a program is used to search through the WordPress source code and pick out every message passed into a __() or _e() function. This list of English-language messages is put into a specially-formatted template file (POT file) that forms the basis of all translations. Generally, you can download a POT file for WordPress, so you shouldn’t have to generate your own. Separate POT files can also be made for themes and plugins, if the theme/plugin developer has enclosed all text in __() or _e() functions.

PO (Portable Object) files
The second step in the localization process is that the translator translates all the messages from the POT file into the target language, and saves both English and translated messages in a PO file.

MO (Machine Object) files
The final step in the localization process is that the PO file is run through a program that turns it into an optimized machine-readable binary file (MO file). Compiling the translations to machine code makes the localized program much faster in retrieving the translations while it is running.

How to switch the language for SI Captcha Anti-Spam in WordPress:
Set WPLANG inside of wp-config.php to your chosen language. For example, if you wanted to use Italian:

define ('WPLANG', 'it_IT');

Note: there must be a corresponding language files in the plugin folder: /wp-content/plugins/si-captcha-for-wordpress/languages/
For example, if you wanted to use Italian:
si-captcha-it_IT.mo
si-captcha-it_IT.po

Getting started making a new translation:
There may already be translation in your language, check before you start! Look in the plugin languages folder.
/wp-content/plugins/si-captcha-for-wordpress/languages/
The country code is part of the file name. Example for Italian: it_IT. The Italian files of this WordPress plugin are named like this:
si-captcha-it_IT.mo
si-captcha-it_IT.po

Translating With Poedit:
If there is not already a translation in your language, you may continue.
You should download the free Poedit to translate, because it makes it easier to translate.

Download the plugin POT file, look for the link below or find it in the plugin languages folder. Getting the latest one online is recommended. Download the language .pot file for SI Captcha Anti-Spam

Open the pot file in Poedit. Click FIle – New Catalog from POT file

translating-with-poedit

Entries are arranged in a list, so that you can easily navigate large catalogs and immediately get an idea about how big part of the catalog is already translated, what needs translating and which parts are only translated in a “fuzzy” way. Fuzzy and untranslated records are highlighted and displayed at the top of the list. Start at the top of the list and translate each line. When done translating click Save.

Poedit will automatically save the .mo and .po files needed by this plugin. Be sure to name them like this:
Example for Italian: it_IT.
si-captcha-it_IT.mo
si-captcha-it_IT.po

Copy the language files into the plugin folder:
/wp-content/plugins/si-captcha-for-wordpress/languages/

When you have completed a new translation, please make a support ticket and request to submit your language files to be included in the plugin download. Be sure to include your name and your web site URL for the credits.

More info:
http://codex.wordpress.org/Translating_WordPress
See also: How to update a translation of SI Captcha Anti-Spam for WordPress

Do you need more help?

Donations by PayPal:

If you find this free contact form program/plugin useful to you, please consider making a small donation for my time invested and to help contribute to further development. My time is very limited and I get dozens of support emails every day. If you are not able to donate, that is OK. Thanks for your kind support! - Mike Challis

Donations by cash or check:
Mike Challis
PO Box 819
Long Beach WA 98631

Comments are closed.