Skip to:
Content
Pages
Categories
Search
Top
Bottom

Manual translation of some words

Viewing 7 replies - 1 through 7 (of 7 total)
  • Avatar of @mercime
    @mercime
    Keymaster

    @mercime

    @websul use a language translation file to customize BuddyPress labels, messages, and URL slugs – http://codex.buddypress.org/extending-buddypress/customizing-labels-messages-and-urls/

    @mercime I use but a few words do not translate. So if someone would help me to find the file that is this nav would be eternally grateful

    Avatar of @ChrisClayton
    @ChrisClayton
    Participant

    @chrisclayton

    @websul The names are defined in each of the components loaders, in the setup_nav() functions.

    Messages: http://buddypress.trac.wordpress.org/browser/trunk/bp-messages/bp-messages-loader.php#L101

    Doesn’t seem to be any easily accessible filter to modify it manually though, so as @mercime mentioned, you will need to use a translation file (might create a patch and ticket in the morning, since a filter in their would be useful.).

    @ChrisClayton thanks so much, i managed to translate the nav, can you tell me where is this “active” http://www.andersonnarciso.com/buddypress/active.png

    Avatar of @ChrisClayton
    @ChrisClayton
    Participant

    @chrisclayton

    with the same translation file or by filtering ‘bp_member_last_active’

    `function cc_get_member_last_active() {
    global $members_template;

    if ( isset( $members_template->member->last_activity ) )
    $last_activity = bp_core_get_last_activity( $members_template->member->last_activity, __( ‘online %s’, ‘buddypress’ ) );
    else
    $last_activity = __( ‘Never active’, ‘buddypress’ );

    return $last_activity;
    }
    add_filter( ‘bp_member_last_active’, ‘cc_get_member_last_active’ );
    `

    That will change it to “online 4 minutes ago” instead of “active 4 minutes ago”. Just replace the word ‘online’ on line 5 with whatever you want

    EDIT: If your trying to do what i think your doing (translating it to a language other than english) then a translation file is the better option. but, that’s just my opinion. Just giving you the tools to make your own decision.

    @ChrisClayton Thanks for reply again. My problem was that the translation into Portuguese of Brazil, was less than 90% finished and I don’t have experience with this type of file, but got little now on the site and saw that the staff has already translated more than 90% and hence the word “active” was translated. Thank you once again for your help, it was very helpful, thanks!

    Avatar of crahrig
    crahrig
    Member

    @crahrig

    @ChrisClayton this was the explanation I was looking for when trying to figure out how to change the wording of “Never Active”. However, I am unable to find where this function is located in the php files or I’m not understanding where to place this overwrite function.

    I’m new to BuddyPress and just starting to get my footing. Let me know if you can provide any help!

Viewing 7 replies - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.