If you re-read the page it does say that you can place the files elsewhere to avoid them being overwritten I just stick em in a new folder kept in /plugins/
Flag the account issue to John James Jacoby or @DJPaul
thank you hnia, you are right, I have read more carefully the page… so I do create a bp-custom.php file ! argh!
something like this?
`<?php
//CUSTOM CODE FOR BUDDYPRESS
//PUT YOUR CODE HERE
define( ‘BPLANG’, ‘mysite’ );
if ( file_exists( BP_PLUGIN_DIR . ‘/bp-languages/buddypress-‘ . BPLANG . ‘.mo’ ) ) {
load_textdomain( ‘buddypress’, BP_PLUGIN_DIR . ‘/bp-languages/buddypress-‘ . BPLANG . ‘.mo’ );
}
?>`
like the example in the page, or do I do write my directory, like this for ex.:
`<?php
//CUSTOM CODE FOR BUDDYPRESS
//PUT YOUR CODE HERE
define( ‘BPLANG’, ‘mysite’ );
if ( file_exists( BP_PLUGIN_DIR . ‘/bp-languages/my-bp-language-‘ . BPLANG . ‘.mo’ ) ) {
load_textdomain( ‘buddypress’, BP_PLUGIN_DIR . ‘/bp-languages/my-bp-language-‘ . BPLANG . ‘.mo’ );
}
?>`
I’m sorry hnia, but I don’t understand very well…
can you please tell me a little more?
thank you!
You have copied the same example twice and that’s the stock default directory for bp language files.
You want the second example below that one:
`define( ‘BPLANG’, ‘mysite’ );
if ( file_exists( WP_PLUGIN_DIR . ‘/buddypress-‘ . BPLANG . ‘.mo’ ) ) {
load_textdomain( ‘buddypress’, WP_PLUGIN_DIR . ‘/buddypress-‘ . BPLANG . ‘.mo’ );
}`
if you want the files in their own directory then do:
/my-language-files/buddypress-‘ . BPLANG . ‘.mo’
hnia, hi, and thank you for your patience…
ehm… there is a little difference in the 2 files I have posted, in the second I wrote my-bp-language… (but I see the order was wrong) because I thought about create a folder “my-bp-language” in the plugin directory…
I would do like you have said:
“stick em in a new folder kept in /plugins/”
so if I have (ops!) understood, is:
`define( ‘BPLANG’, ‘mysite’ );
if ( file_exists( WP_PLUGIN_DIR . ‘/buddypress-‘ . BPLANG . ‘.mo’ ) ) {
load_textdomain( ‘buddypress’, WP_PLUGIN_DIR . ‘/my-language-files/buddypress-‘ . BPLANG . ‘.mo’ );
}`
and I put a folder “my-language-files” IN the plugin folder… is it right?
reassure me, please…
sorry hnia I’m totally newbie, I promise you I go on amazon to search the dummy’s book!!!
(but the english too is not my cup of tea… sigh!)
ciao! you are kind!
Sorry missed that slight difference
You just need to make sure the file_exists function line looks for the file in the same directory as the load file line.