Skip to:
Content
Pages
Categories
Search
Top
Bottom

Changing labels i nthe Activity Stream

  • @marketraisen

    Participant

    In the past I did this through the now extinct languages folder and I have been left with this..

    Customizing Labels, Messages, and URLs

    I’ve been through every solution on google and followed the above to the word with no change whatsoever.

    All I am trying to do is change “posted an update” to “posted on”.

    Going mad here. Please help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • @danbp

    Participant

    @marketraisen,

    the original code is %s posted an update
    To modify this the right way, you have to use the language file and an appropriate compilator such as poEdit to generate the mo file.

    Don’t know what solution you didn’t found, guess you have to search this forum for translation related topics.

    A very dirty solution would be to use this snippet and add it to your child-theme functions.php

    function marketraisen_change_bp_update_text( $translated, $original_text, $domain ) {
    		
    	if ( 'buddypress' !== $domain )  
    	return $translated; 
    	
    	switch ( $original_text ) {
    		case '%s posted an update':
    		return '%s posted on';
    				
    		default:
    		return $translated;
    	}
    }
    add_filter( 'gettext', 'marketraisen_change_bp_update_text', 10, 3 );

    @marketraisen

    Participant

    I was able to fix it, I was just using the wrong filename for the .po and .mo, which was probably a good thing as I was only changing the file for -en_GB and not the other languages.

    Was going to come back and apologise but had my head stuck on something else..!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Changing labels i nthe Activity Stream’ is closed to new replies.
Skip to toolbar