Put your language file here:
/wp-content/languages/buddypress/
And you will not have to worry about upgrades removing your language file.
Thank you r-a-y that worked inmediatly, But I just realized that now some parts are not translated, I guess that they added some extra lines or something but you really help me, does it work for all plugins or themes? I mean I use “sb-login” plugin in my web and the “Hueman” theme, could I do this: “/wp-content/languages/sb-login/” “/wp-content/languages/Hueman/” ?
You have to merge your .pot file with the latest one located in /wp-content/plugins/buddypress/buddypress.pot
.
Read the “Updating your custom language file” section of this codex article:
Customizing Labels, Messages, and URLs
—
For other plugins, placing your custom translations in /wp-content/plugins
or /wp-content/languages/plugins/
should work.
@r-a-y
guess you’re wrong !
Put your language file here:
/wp-content/languages/buddypress/
And you will not have to worry about upgrades removing your language file.
/wp-content/languages/buddypress/ is the directory where glotpress uploads the BP translation file.
– when the directory is empty ( a first install for example)
– when the mo file is old
– the file is also checked when you modify your site language
To test, make main site to english, throw an old BP .mo into that directory
Revert site language to fit this mo and you’re immediatly invited to update your translation.
The place to put a custom po/mo is /wp-content/languages/
buddypress.mo in this directory is not overwriten.
But it’s unclear to me (for the moment) if this directory is completly overwriten when WP updates ?
But i’m sure it was not the case in the past < BP 1.9/WP 3.9 😉
danbp – You’re right. My technique will work, but would get overwritten when translations are automatically updated.
I just checked and WordPress saves automatic translations to /wp-content/languages/plugins/
so we should be safe if custom BP translation files are saved to /wp-content/languages/buddypress
or /wp-content/languages
.
WordPress might say that there is a new BuddyPress translation, but if you’re using the custom method, then you can ignore the notice as BuddyPress will keep using the custom translation file.
To tell WordPress to stop fetching automatic translations for BuddyPress, see:
https://buddypress.org/support/topic/disable-automatic-translation-updates/#post-234528
Thxs @r-a-y, i adopt your plugin ! Though the securest way to keep customisation in place. 😉