• The plugin textdomain is not loaded properly and thus leaves the plugin un-able to be translated. I’ve implemented a fix, so anyone trying to use another language with this plugin can do so.

    In bpfb.php in lines 32-52 many variables are declared to make the proper textdomain and plugin folder locations, however it doesn’t work in the latest version of WordPress. The simplest fix I found is to bypass the variable declarations and just change line 53 to be in the proper format like so :

    load_plugin_textdomain( ‘bpfb’, false, dirname( plugin_basename( __FILE__ ) ) . ‘/languages/’ );

    Please update your plugin to reflect proper WordPress textdomain declarations. Thank you.

    http://wordpress.org/extend/plugins/buddypress-activity-plus/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey,
    I’m strugglin to fix this problem. I followed your instructions and deleted:

    $textdomain_handler('bpfb', false, BPFB_PLUGIN_SELF_DIRNAME . '/languages/');

    and replaced it with:

    load_plugin_textdomain( 'bpfb', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );

    It still doesn’t fix the problem for me, trying to translate in to swedish…

    Any idea where to go from here?

    Thread Starter Jacob Schweitzer

    (@primetimejas)

    You’ll need to put a language file in that directory /languages/ for your language. I usually use the plugin called ‘codestyling localization’ for making the .po and .mo files. There is multiple ways to do this but I’ve found this way to be the easiest for me.

    I tried the same here, but it did not solve the problem for me. I changed the code and added the language files, but nothing happened. Anyone have any suggestions?

    Thread Starter Jacob Schweitzer

    (@primetimejas)

    The site should be setup properly for your language using something like this in your wp-config.php file:

    define(‘WPLANG’, ‘sv_SE’);

    That example would set Swedish language for the site. If you need more specifics about this, check here – http://codex.wordpress.org/WordPress_in_Your_Language

    I only made this small fix for this plugin, assuming that the site was otherwise successfully setup for your language already. There are a number of possible common problems including corrupt language files (I suggest using the codestyling localization plugin), the site not being in the same language as the language files you are trying to use, and improper naming of language files (codestyling localization wouldn’t allow this).

    Good luck guys.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: BuddyPress Activity Plus] Textdomain fix for translation’ is closed to new replies.