This is a rough guide on how to translate DukaPress using poEdit. It is adapted from Translating WordPress Plugins by Lester Chan. We are going to go through the steps of translating DukaPress into the Swahili language used in the Republic of Kenya.
- Download poEdit From http://www.poedit.net/download.php
- Install poEdit
- Launch poEdit
- Download the DukaPress POT file from here ( http://plugins.svn.wordpress.org/dukapress/trunk/languages/ ). Please download dukapress.pot.
- In poEdit, Go To ‘File -> New catalog from POT file’
- Browse for the file ‘dukapress.pot’ which you just downloaded and Click ‘Open’.
- Fill in the following details to the settings:
Project name and version: DukaPress 2.0
Team: Fill in your own name
Team’s email address: Fill in your own email address
Source code charset: Leave it blank
Pural Forms: nplurals=2; plural=n != 1;
- Click ‘Ok’
- Save it as dukapress-sw_KE.po
- Click ‘Save’
- Type in the translated string in the small box located at the bottom left hand corner of the screen.
- Translate the remaining strings.
- When you are done, click on the ‘Save Catalog’ button located on the top, it is the second button from the left.
- Upload dukapress-sw_KE.po and dukapress-sw_KE.mo to your site into YOUR_WORDPRESS_FOLDER/wp-contents/plugin/dukapress/languages
- Just a note, the dukapress-sw_KE.mo is automatically generated by poEdit, you need the file in order for the translation to work.
- Make sure that WordPress is already in your own language or the plugin translation will not work.
- You should be able to follow these general steps to translate DukaPress into your own language.
- The filename dukapress-sw_KE.po comes about by incorporating the locale of Kenyan Swahili i.e. sw is the language code for Swahili and KE is the country code for Kenya. If, for example, you wanted to translate into French spoken in France, you would need to get the language code for French (fr) and the country code for France (FR) to get your filename: dukapress-fr_FR.po.