WordPress Language Translation .po and .mo files are not necessary to translate the BulletProof Security plugin’s English language into your language. Please click the BulletProof Security Forum Topic link below to find out how to use the Google Chrome Browser to automatically translate the English text in the BulletProof Security plugin into your language.
This WordPress Plugin Language Translation Tutorial is using the BulletProof Security WordPress plugin as the example for this tutorial. The same Poedit language translation techniques would be used to translate other WordPress plugins. There are 2 language translation methods shown in this tutorial. The second method is probably the simpler and faster method – New Catalog from POT file… Plugin Language Translation – Method 2.
Language Translation Tutorial For The BulletProof Security Plugin With Poedit
New Catalog… Plugin Language Translation – Method 1
Download the bulletproof-security.zip file and the Poedit .po editing software
1. Download the BulletProof Security zip file to your computer from WordPress.org here
http://wordpress.org/extend/plugins/bulletproof-security/
The zip file name will be bulletproof-security.0.47.zip (or whatever version of BPS that you will be translating).
2. Unzip the zip file to your C: Drive. This will create a folder called bulletproof-security. C:\bulletproof-security.
3. Download and install Poedit from here http://www.poedit.net/download.php.
Set up Poedit to Translate the BulletProof Security plugin into your language
4. Open Poedit, click on the File menu, click on New catalog… you will see this window below.
5. For Project name and version: type in bulletproof-security and then choose your Language and Country and type in your Team and Team’s email address.
6. Click on the Paths tab. Click on the New Item button and type in the path to the bulletproof-security folder the unzipped on your computer. Very Important! After typing in the path to the bulletproof-security folder you need to click anywhere in the white area below the path you just entered in order for the path to be saved. See the next screenshot with an arrow pointing to the white area below the path you just entered. The blue box should disappear, which will indicate that the path is saved. This also applies to adding New items to the Keywords Tab as well.
7. Click on Keywords tab. Click on the New item button and add _e (underscore e), then add __ (double underscores) and click the OK button. Very Important! After typing in the _e and __ New items you need to click anywhere in the white area below just like you did on the Paths tab to save your path. The blue box should disappear, which will indicate that both of your New items are saved.
Creating and naming your .po file
8. When you click the OK button a file explorer window will automatically open. Navigate to the bulletproof-security folder you unzipped on your computer. You will be saving your new .po file using the naming convention shown below. In this example I am creating a Spanish .po translation file using the naming convention of bulletproof-security-es_ES.po. Very Important! The naming convention for your .po file is composed of a Language Code and a Country Code. The lower case “es” is for the Spanish language and the upper case “ES” is for Spain. For a German .po file for BPS the file name would be bulletproof-security-de_DE.po. Your .mo file will automatically be created by Poedit and named using the same naming convention of your .po file automatically.
Find Your Language Code and Country Code For Naming Your .po File
http://www.gnu.org/software/gettext/manual/html_chapter/gettext_16.html#Language-Codes
Poedit Updating catalog…
9. If you have done everything correctly then when you click the Save button you should see an Updating catalog… window and then an Update summary window pop up. When you click the OK button you will now see BulletProof Security plugin text strings ready for translation. See next screenshot.
Translating the BulletProof Security Plugin Text Strings
10. After clicking the OK button you will see the BulletProof Security plugin text strings ready for translation.
Translating the BulletProof Security Plugin Text Strings Continued
11. To translate each text string you will click on it and then enter the translation of the text string in the bottom text area. In this example I have translated the English word “Settings” to the Spanish word “Configuración”. In the right Translation window you will see your translated words. Once you have completed translating all the English text strings into your language you will then click the File menu and click Save. This will save your .po file and also save your .mo file that was automatically created by Poedit.
To speed up the language translation process, you can use the Google Language Translator. Copy the original text to be translated into Google Translate and then make any corrections to the translation directly within the Google Translator window. Your corrections will be remembered so that any other similar translations will not need to be corrected. Then copy the translated text back into Poedit. This is a huge time saver since you would not need to actually type in the text translation and would instead just be doing a copy and paste from Google Translate to Poedit.
In this example for creating Spanish translation files for BPS, the 2 files are named: bulletproof-security-es_ES.po and bulletproof-security-es_ES.mo. If you were translating BPS into German the 2 files would be named: bulletproof-security-de_DE.po and bulletproof-security-de_DE.mo.
Important Note: for text strings that contain %s please include those in your translated text.
Example:
Original string: Downloaded %s times
Translation: Descargado %s veces
Send your completed .po and .mo BulletProof Security plugin translation files to info[at]ait-pro[dot]com.
Troubleshooting
If something is not set up correctly and you did not see the BulletProof Security plugin text strings you can manually check your Poedit settings by clicking on the Catalog menu and then click Settings… where you can check the Project info, Paths and Keywords Tabs for incorrect settings.
To manually run another check for translatable text strings in the BulletProof Security php plugin files you can click on Update catalog button on the Poedit toolbar.
Language Translation Tutorial For The BulletProof Security Plugin With Poedit
New Catalog from POT file… Plugin Language Translation – Method 2
Download the bulletproof-security.zip file and the Poedit .po editing software
1. Download the BulletProof Security zip file to your computer from WordPress.org here
http://wordpress.org/extend/plugins/bulletproof-security/
The zip file name will be bulletproof-security.0.47.zip (or whatever version of BPS that you will be translating).
2. Unzip the zip file to your C: Drive. In this tutorial the folder name I used is: C:\BPS47.
3. Download and install Poedit from here http://www.poedit.net/download.php.
4. Open Poedit, click the File menu and click New Catalog from POT file… The Open catalog template window will open. Navigate to the folder where you unzipped the zip file you downloaded and click on the bulletproof-security.pot file and click the Open button. For this example the folder path is: C:\BPS47\languages.
5. After clicking the Open button the Poedit Settings window will open to the Project info Tab. Enter your Team name, Team’s email address, choose the Language that you will be translating the plugin too and choose the Country that is associated with the language translation. You only need to enter in the Project info information and click the OK button. The Paths and Keywords Tabs already contain the correct information and do not require additional changes by you.
6. After clicking the OK button a Save as… window will open. Type in the name of your new .po file. For this example I am creating a Spanish .po language translation file. So the name of the file will be: bulletproof-security-es_ES.po and then click Save.
Very Important! The naming convention for your .po file is composed of a Language Code and a Country Code. The lower case “es” is for the Spanish language and the upper case “ES” is for Spain. For a German .po file for BPS the file name would be bulletproof-security-de_DE.po. Your .mo file will automatically be created by Poedit and named using the same naming convention of your .po file automatically.
Find Your Language Code and Country Code For Naming Your .po File
http://www.gnu.org/software/gettext/manual/html_chapter/gettext_16.html#Language-Codes
7. After clicking Save you will now see the BulletProof Security plugin text strings ready for language translation.
8. See Step 11. above – Translating the BulletProof Security Plugin Text Strings Continued
More Help Resources
http://www.appthemes.com/blog/how-to-translate-a-wordpress-theme/
http://codex.wordpress.org/User:Skippy/Creating_POT_Files
http://codex.wordpress.org/I18n_for_WordPress_Developers
http://codex.wordpress.org/Translating_WordPress
Bonus WordPress Language Translation Tutorial – checking .po and .mo files
Quickly switch WP Dashboard admin languages with a single click without having to modify the wp-config.php file. This comes in real handy if you are checking language translation .po and .mo files for errors.
1. Install the WP Native Dashboard plugin – http://wordpress.org/extend/plugins/wp-native-dashboard/
2. Download the WordPress version in the language you want – http://codex.wordpress.org/WordPress_in_Your_Language
3. Unzip the WordPress Language version you downloaded to your computer and copy the /wp-content/languages .po and .mo files to your WordPress website’s /wp-content/languages folder. If the languages folder does not exist in your website’s wp-content folder then create it or just copy the entire languages folder from the WordPress language version that you downloaded and unzipped to your website’s wp-content folder.
4. Click on the Native Dashboard link under the Settings Panel and on the options page under Installed Languages you should now see the particular language that you just added to your website’s /wp-content folder.
5. To switch languages click on the top left corner of your WP Admin bar where you will see a drop down list of available languages to choose from.