Skip to:
Content
Pages
Categories
Search
Top
Bottom

Rename components


  • mlemberg
    Participant

    @mlemberg

    I am looking for a way to rename certain components, i.e. Groups, Forums etc.

    I have already localized the installation with the .po and .mo files and that does most of the job. But two things are still missing, and I’m having a hard time figuring out how to change that:

    1. How to rename slugs?

    Is there any easy way to do this? For instance if I want to rename mysite.com/forums to mysite.com/debate can I do this without hardcoding?

    2. Page titles

    I have noticed that my localized Buddypress doesn’t chance the names of page titles. So my Wire is still named “Wire” in the browser, and “Groups” are still named Groups etc. How do I change that?

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

  • Boone Gorges
    Keymaster

    @boonebgorges

    1. Rename slugs by defining global constants in /wp-config.php. Eg:

    define ( 'BP_GROUPS_SLUG', 'clubs' );

    2. Page titles are generated by bp_page_title(), which is defined in bp-core/bp-core-templatetags.php. It looks to me like they are properly localized, though. Maybe there’s a missing translation in the .po/.mo files? What language are you using?


    mlemberg
    Participant

    @mlemberg

    Thanks for the reply. I have translated Buddypress myself to da_DK.


    mlemberg
    Participant

    @mlemberg

    Hmm… Just tried out defining slugs in wp-config.php but it didn’t change anything? Wrote the following at the bottom:

    /** Set up Buddypress Slugs */

    define ( ‘BP_GROUPS_SLUG’, ‘ideer’ );

    define ( ‘BP_FORUMS_SLUG’, ‘debat’ );

    define ( ‘BP_MEMBERS_SLUG’, ‘medlemmer’ );

    define ( ‘BP_ACTIVITY_SLUG’, ‘aktivitet’ );

    define ( ‘BP_GROUPS_SLUG’, ‘clubs’ );

    define ( ‘BP_WIRE_SLUG’, ‘vaeg’ );

    Also I took a look at bp_page_title() but it seems to me that it only defines titles for the blog area. Not directories, wire etc. Am I misunderstanding anything?


    r-a-y
    Keymaster

    @r-a-y

    Try putting the define lines in wp-config.php above:

    /* That's all, stop editing! Happy blogging. */

    Or try putting the define lines in /wp-content/plugins/bp-custom.php.


    mlemberg
    Participant

    @mlemberg

    Thanks, that did the trick for me. Any help regarding the bp_page_title() issue?


    mlemberg
    Participant

    @mlemberg

    Ok, now it seems that another problem has shown up.

    I have renamed the slugs for i.e. GROUPS. But as a result of that, the drop-down adminbar submenu containing the “My groups”, “Create group” and “Group Invitations” functions has been disabled.

    Anybody knows how to crack that nut?


    mlemberg
    Participant

    @mlemberg

    Bump!

    Any suggestions?


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    @mlemberg

    If what you want to do is translate and/or localize the text of each component, there are a few posts regarding how to do that already.

    Can you point me to where things aren’t localized? There were a few places in 1.1 that have been patched in 1.1.3, and 1.2 should be pretty solid in this regard.


    alanchrishughes
    Participant

    @alanchrishughes

    Is there a simple way to completely rename things? Like I got this to work fine re-url’ing “Groups” to “Topics” but then it still shows up everywhere else as groups. So beside manually going through, finding every instance of the word groups, and changing it to topics, is there any other way?

    Where you guys ever able to fix this thing? same problem here.. :(

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Rename components’ is closed to new replies.
Skip to toolbar