WordPress.org

Ready to get started?Download WordPress

Forums

Polylang
[resolved] Polylang Buddypress compatible (9 posts)

  1. dr_who20
    Member
    Posted 1 year ago #

    Buddypress uses WordPress pages to display content. The problem is that i cant duplicate the Buddypress pages for other languages.
    An easy way to use the default Buddypress page into an foreign language is to connect the default page into a foreign menu.
    But when i navigate to the Buddypress page the whole site jumps back to his default language.
    Is there a possibility to insert a default page into multi menus without the site changes back to his default language after the preferred language is set?

    http://wordpress.org/extend/plugins/polylang/

  2. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    Sorry. I don't know buddypress and never tested it with or without Polylang. So I have no clue how to help.

  3. dr_who20
    Member
    Posted 1 year ago #

    Ok, forget the Buddypress thing. Is it possible to make an option which make a page jumps back to default page if there is no translation available without changing the localization?

  4. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    Not sure that it would do what you want. Did you try checking the option "Forces link to front page" in the widget options?

  5. dr_who20
    Member
    Posted 1 year ago #

    The trick already works but when i navigate to a default tab in a foreign menu, the whole foreign menu changes back to default.
    If you can make it possible to add default tabs in foreign menu without changing the foreign menu, it would be awesome.
    Btw, i tried the forces link to home page but did not help.

  6. dr_who20
    Member
    Posted 1 year ago #

    I managed to get Polylang Buddypress compatible. Follow the steps and it will translate for each language:

    • Create 1. an extra template.php in your theme and name it "buddymulti" or whatever you like.
    • 2. Paste the following code in your buddymulti.php
    <?php 
    
    /*
    Template Name: Buddymulti
    */
     ?>
    			<?php the_post() ?>
    				<?php the_content() ?>
    				<!-- .post -->
    • 3. Log into your wordpress dashboad and install the following plugin: "Include HTML and PHP"
    • 4. configure the buddypress pages as follows:
      Associate a WordPress Page with each BuddyPress page with your default template in your default language.
      For all the other languages use the buddymulti template
    • 5. Put for all the following foreign buddypress pages the correct include code in your post:
      Activity Streams => [include]/activity/index.php[/include]
      User Groups => [include]/groups/index.php[/include]
      Members => [include]/members/index.php[/include]
      Register => [include]/registration/register.php[/include]
      Activate => [include]/registration/activate.php[/include]
    • 6. Finally upload all the foreign buddypress languages you need in "/wp-content/languages/" folder
  7. nikospkrk
    Member
    Posted 10 months ago #

    @dr_who20 : I'm VERY interested in having polylang working with buddypress, is your method still working with uptodate WP, polylang and BP versions?

    ps: I think there's something in your previous post that caused the layout of this topic to be messed up.

  8. miguelcortereal
    Member
    Posted 6 months ago #

    nikospkrk has done a great research, it works.

    However if you're using a child theme you have one step more:

    7. At your dashboard go to Plugins --> Editor select "Include HTML and PHP" and at main.php file, look for this line of code:

    include get_theme_root().'/'.get_template().'/'.trim($filename);

    Replace by:

    include get_theme_root().'/'.get_stylesheet().'/'.trim($filename);

  9. miguelcortereal
    Member
    Posted 6 months ago #

    I said it works to have default Buddypress pages translating.

    It doesn't work as a fully solution for Buddypress translation, there's a lot of functionality to be covered.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic