Custom Language changes not showing
Hey I followed the tutorial here on changing language:
I did everything they said but my language is still not change. Anybody have some tips for me getting this working.
I have all the latest software installed.
I did the same using Poedit. Uploaded the .mo to the same place the original buddypress.pot was.
I couldn’t find a bp-custom.php file anywhere in my install, so I created one and c&p’d the code the tutorial linked above told me to. Do I need to put something in place of “mysite”, and if so, what? Should there be anything else in bp-custom.php? I uploaded it to wp-content/plugins/buddypress, should it go elsewhere?
It shouln’t go in wp-content/plugins/buddypress. Just put it in wp-content/plugins/
Moved it, but nothing changed
ETA: I edited and converted the original buddypress.pot file to the .mo file and then uploaded that, if that makes any difference. So, not there’s buddypress.pot and buddypress.mo in my wp-content/plugins/buddypress/bp-languages folder, when originally there was only the .pot file. Is that wrong?
Make sure you’ve got the path to the .mo file correct. The tutorial assumes that you’re keeping it at wp-content/plugins/buddypress/bp-languages. Is that where you’ve got it?
Can you post the code that you’re using in your bp-custom.php file?
Are we talking about the .mo file, or the bp-custom.php file I created? I’ve tried both files in wp-content/plugins/buddypress/bp-languages/ as well as wp-content/plugins/ with no result.
If someone can tell me how to post code here, I’ll post what I have in my bp-custom.php. I tried earlier and it just kept posting blank.
Use pastebin.com to post code and then put a link here. I’d like to see what’s in your bp-custom.php file.
bp-custom.php should be in wp-content/plugins.
Thanks for looking! I did try changing “mysite” to something else, but that didn’t do anything for me either.
Um, ok, I think I haz teh dumbz. When I save w/ Poedit, I get an error popup that says something along the lines of
yadda yadda yadda “field “Language-Team” still has the initial default value”
I thought it was saving it anyway? Yeah…it’s been a long day. I’ve done a search for “Language-Team” and come up with nothing. I looked through the Poedit prefs and found nothing. How do I get rid of this error?!
ETA: Nevermind about that…it IS saving my changes. Still have no idea what that error is, though, or why changes aren’t being reflected on my site when I upload the edited .mo file
That code looks correct, as long as your .mo file is located at
Are you sure you’ve named it correctly?
AHHHHHHHHHH!!!! You’re a genius!!!!!!!!!
Did I miss where the tutorial here said to name the .mo file in that way?!
The tutorial is not very clear on that, no. But you can see that it’s expecting the file to be named that way, since BPLANG is defined as ‘mysite’ and it’s looking for a file called ‘buddypress-’ . BPLANG . ‘.mo’.
Glad it works! I should fix up the codex page so that it’s clearer.
Yeah, because I totally didn’t get that from it. Maybe no one expects people who know next to nothing about PHP to be attempting a hack like this?
Anyway, thank you so much for this!
Running BP 1.2.7 on WP Multisite 3.1-RC5-17466
@Boone Okay. I followed all the steps illustrated in the codex to revise 20+ labels on my site. I don’t know why things aren’t working, and I don’t understand why the codex instructions tell me to create a “languages” directory in my wp-content folder, and upload my .po and .mo files there. Boone, you wrote “as long as your .mo file is located at wp-content/plugins/buddypress/bp-languages/buddypress-mysite.mo” while the codex directs the files to wp-content/languages
I downloaded the buddypress.pot file from my bp-languages folder, then duplicated it and make my edits in Poedit. I saved the file as buddypress-en_US.po and, although I received the Poedit “initial default” error that justbishop received, Poedit saved the file and generated the .mo file.
I changed the .mo file title to buddypress-montclairvillagelive.mo (My site is montclairvillagelive.com), then created /wp-content/languages and uploaded both files to the folder.
The changes didn’t take place and I’m up the creek without a paddle.
This thread is over 9 months old.
The codex instructions have been updated since then to better reflect the changes made to BP 1.2.7.
Putting the language file in /wp-content/languages/ is preferred because when you upgrade BP, your changes won’t be wiped out!
You have to make sure your generated .mo file is valid. I’d suggest recreating your translation files from scratch. Make very tiny changes then upload it to /wp-content/languages and check to see if your alterations stick. If they stick, keep on editing and then regenerate your translation files.
Also make sure your locale is correct.
To do a quick check, put “ in a template file somewhere and refresh the page to see.
I just tested this to confirm and it works fine; I did not try this on WP 3.1 in Multisite mode though.
@ericreynolds007 – After re-reading your post, I’ve found the root of your problem.
Rename buddypress-montclairvillagelive.mo to buddypress-en_US.mo.
Also make sure to upload buddypress-en_US.po as well.
You must be logged in to reply to this topic.