Posts Tagged ‘translation’
For one of my projects, atfe.org, I use a WordPress MU installation with a BuddyPress installation on top to provide social networking features. This site, however, is more professionally oriented and therefore I wanted to change references such as “Friends” to “Contacts” and so forth. As I didn’t want to change every line of code that contained “Friends”, so I opted to modify a language translation for both BuddyPress and WordPress MU.
When I was first researching how to do this, I was absolutely astonished at how misleading and vague documentation was regarding this. Forms regarding this topic were devoid of a direct approach on how to install these language files, in fact I was only able to figure out how to accomplish this by downloading different BuddyPress language installations and reading the original WordPress documentation. Hopefully this will save someone the pain and time of having to sift through various hints and tips and digging through documentation. Below is a direct approach on how to accomplish a simple translation for BuddyPress, this is not an in-depth tutorial and more information on WordPress translations can be found here.
- First step is to download translation software, I myself chose poEdit since it has an OSX version. There are other editors avalable here from the WordPress site.
- Download the official WordPress POT file and open it in poEdit.
- Once open, save the file as en_US.po, opEdit will automatically create en_US.mo in the same directory.
- Next step is to modify the buddypress.po file to your liking. Locate this file in your BuddyPress installation under /wp-content/mu-plugins/bp-languages/ and open it using poEdit.
- Make the changes you want, for example I “translated” My Friends to My Contacts.
- Save the file as buddypress-en_US.po, again poEdit should automatically create buddypress-en_US.mo in the same directory.
- Log in to your WordPress MU admin page. Make sure the “American English” is selected in both Settings->General and Site Admin->Options.
- Check your BuddyPress profile, My Friends should now read My Contacts.
Contrary to forms on the BuddyPress site, you do NOT have to edit your wp-config.php file, nor do you have to create a language directory in wp-includes. If you update your BP installation, make sure to check the new buddypress.po file to be sure no changes have been made from the previous version.