BuddyPress Activity Plus
Localizing languages / button text (2 posts)

  1. camcollins
    Posted 3 years ago #

    BP Activity Plus is awesome! We are very reliant upon it to provide our members with a simple way to upload photos and video links.

    I would like to change the button text once an image is uploaded. Our users are getting confused when after they upload a photo it says "Add photos". Makes sense to me, but what can I say.

    So...I thought that the most effecient way to do this was to create a custom .po and .mo file in ./languages dir. However unlike the Buddypress plugin, I was unable to find a languages variable that I could define in my functions.php file to point to my new .mo file.

    I have modified the language file succesesfully in Buddypress following this post. I created a new .po file in languages, did the translations in POEdit and then saved the file which created both a .po and a .mo file. However the plugin doesn't seem to know about this new languages file.

    I then modified bpfb-default.po using POEdit. When I saved it created a new .mo. Still no change. My last resort was to modify ./lib/class_bpfb_binder.php. This is a sub-optimal approach because I will now have to maintain this file everytime I upgrade the plugin. (Yuck!). Even hard coding the change, I still cannot get the button text to be "Post photos" after stopping/starting my local server, clearing cache, etc.

    class_bpfb_binder.php mod:

    wp_localize_script('bpfb_interface_script', 'l10nBpfb', array(<br />
    			'add_photos' => __('Post photos', 'bpfb'),

    Has anyone had success modifying the languages files in this plugin or (worse case) modifying button text?



  2. Santaclaes
    Posted 3 years ago #

    I have the same problem, can't get the *.po and *.mo file to work. Trying to translate to swedish but nothing happens when I upload the new files to the language directory. Have you come to any solution to the problem yet?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • BuddyPress Activity Plus
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic