boonebgorges / bp-groupblog

BuddyPress Groupblog
GNU General Public License v3.0
15 stars 10 forks source link

translation files aren't being loaded from wp-content/languages #41

Open JonathanReeve opened 9 years ago

JonathanReeve commented 9 years ago

As I understand it, best practices for translating plugins involve putting the translations files (.po and .mo files) in wp-content/languages/plugins, since that way, they aren't overwritten every time the plugin is updated. WordPress provides for this by loading WP_LANG_DIR . '/plugins/' . $mofile with the function load_plugin_textdomain(). But bp-groupblog only runs this function if a translations file exists at WP_PLUGIN_DIR . 'bp-groupblog/languages/...', which means that it can't load files in wp-content/languages (this is at https://github.com/boonebgorges/bp-groupblog/blob/master/bp-groupblog.php#L75). A fix for this would be to remove the check for mofiles in plugins/bp-groupblog/languages which would allow WordPress to look in wp-content/languages.