Skip to:
Content
Pages
Categories
Search
Top
Bottom

I need to find this button link

Viewing 2 replies - 1 through 2 (of 2 total)
  • Profile photo of alex80ks
    alex80ks
    Participant

    @alex80ks

    wp-content/plugins/buddypress/bp-languages there you can find translation file.

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Register is actually used at least in four different places, with 4 different context.
    Register page title, widget title, button name and some admin side registering action. So chaging this is not very easy for the moment.

    If you use the buddypress registration widget, the button code is near buddypress/bp-bp-core/bp-core-widgets.php:94

    If you use BP 2.0, and use custom translation, the .mo file can be put into wp-content/languages/plugins/buddypress.mo

    If you let the mo file in the usual translation folder (aka wp-content/languages/buddypress.mo & buddypress.po), your change will be lost if you have enabled automatic updates.

    Alex is partialy right to invite you to use the translation file to change “register”, but bp-languages never contain the translation, only the pot file (a workig file with the strings you can translate) for the current version.

    Be also aware that this folder will no more be used in 2.1.
    BuddyPress translation are now on Glotpress and avaible for automated updates, implemented in WordPress 3.8

    For any custom work, see above.

    Another way to handle this situation, is to force the translation. This is a workaround and should not be used for plenty strings, as it slows down the gettext request (and your server), but for one or two string it is ok.
    Add this to the theme functions.php or into bp-custom.php

    function bpfr_force_register_button_translation( $translated, $original_text, $domain ) {
    	
    		if ( 'buddypress' !== $domain )  
    		return $translated; 
    	
    	switch ( $original_text ) {
    		case '<a href="%s" title="Register for a new account">Register</a>':
    		return '<a href="%s" title="Register for a new account">ZOUBIDOU</a>';				
    		
    		// just add case for other strings
    		default:
    		return $translated;
    	}
    	
    }
    add_filter( 'gettext', 'bpfr_force_register_button_translation', 10, 3 );
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘I need to find this button link’ is closed to new replies.
Skip to toolbar