Thanks very much for that, Jeff…
So if I add a translation to the .pot file at bp-languages/buddypress.pot, what else needs to be done to make the language switch?
1. Download poEdit.
2. Install poEdit.
3. Get .pot file from buddypress.
4. Load .pot file into poEdit.
5. Start translating.
6. When finished, save and the .po and .mo file gets made automatically.
If I remember correctly, thats the way to go.
You also have to edit/create a /plugins/bp-custom.php and add the bplang definition.
define( ‘BPLANG’, ‘yourlanguagename’ );
if ( file_exists( BP_PLUGIN_DIR . ‘/bp-languages/buddypress-’ . BPLANG . ‘.mo’ ) ) {
load_textdomain( ‘buddypress’, BP_PLUGIN_DIR . ‘/bp-languages/buddypress-’ . BPLANG . ‘.mo’ );
}
Thanks very much for that, stwc, much appreciated…
I’m still not entirely clear where the .mo file needs to go – just in where the buddypress.pot file is now, or do I need to create a new directory somewhere?
You can just keep the .po and the .mo where the Buddypress one is (as in the code snippet above). Name them something appropriate.
Edit: Actually, I don’t know if that’s wise or not. Best wait for second opinion on location.
I’ll take that as a working theory and give it a whirl, and then see if there are any second opions on offer at any stage…
Thanks a lot for your input, stwc and Xevo and Jeff…
@stwc
I’m trying the same route….I am following Xevo instructions. After that I do need to follow your BLANG instructions?
There is no bp-custom.php in the Plugin folder, so I have to create one with only your code above in it?
I downloaded some .mo and .po files already, from an older version of Buddypress (that what I am using it for) and placed them in the Language folder (where the .pot file is), but nothing happens. Is this because of the BLANG thing to be done?
In the ‘yourlangaugename’ part, do I have to fill in my langauge, or the filename of the .po and .mo files?
Working on this for more than a week, still feel like a dummy…
Yep, add bpcustom.php if it doesn’t exist, and (as I recall) use the filename of the .po and .mo files as your BPLANG.