Thank you for your interest in helping me.
Yes, here is my code:
define( ‘BPLANG’, ‘myrelative’ );
if ( file_exists( ‘/wp-content/bp-languages/bp-family-‘ . BPLANG . ‘.mo’ ) ) {
load_textdomain( ‘buddypress’, BP_PLUGIN_DIR . ‘/wp-content/bp-languages/bp-family-‘ . BPLANG . ‘.mo’ );
}
And, yes, I do have the folder and files under the bp-languages folder directly off wp-content rather than under buddypress in order to preserve the modifications.
I just can’t tell if the file is even being loaded and whether there is a problem with it.
I think that your file location is the problem. If you have your file in wp-content, it should read
load_textdomain( 'buddypress', '/wp-content/bp-languages/bp-family-' . BPLANG . '.mo' );
Is it not though a good idea to relocate it? prevent overrights if using automatic updates, somewhat a flawed mechanism if ones language files will keep getting deleted.
While on the subject and as it might be pertinent to this threads question, when creating a new po file I’m correct in thinking what we do is take the original apply revisions to existing entries and create a new file mo but does that mo file simply contain references to the amendments only?
In other words if the original language file is updated with perhaps new labels /text what becomes of our customised file, are the two read in conjunction.
Yep, it’s a good idea to relocate it, but the path was still wrong. The constant BP_PLUGIN_DIR points to the BP folder. Then you have the wp-content folder, so right there’s the problem. You could use this:
load_textdomain( ‘buddypress’, WP_PLUGIN_DIR . ‘/bp-languages/bp-family-’ . BPLANG . ‘.mo’ );
This assumes that you have your folder structure like this:
wp-content/plugins/bp-languages
Right, I was assuming that the directory structure was wp-content/bp-languages. And yes, it’s a good idea to relocate it.
Well, thank you for the insight, however, it did not work when I followed the tutorial step by step exactly either. I moved it after reading and going through the latest upgrade experience of having a modified file deleted upon upgrade. The path was definitely wrong in what I posted and it has been corrected, however, I still do not have my custom language text being used on the site.I want to know what I can add to some php file that will display the status of the language file and provide a better path to explore for fixing this situation.
Thank you for the help.