WordPress.org

Ready to get started?Download WordPress

Forums

Polylang
[resolved] Compatibility between bbPress and Polylang (6 posts)

  1. JoanBotella
    Member
    Posted 1 year ago #

    Hi everyone.

    I’m developing a web site with multilingual support, using WordPress 3.4.2 and the Polylang plugin 0.9.4 . I’d love to add a forum to the site, so I downloaded, installed and activated bbPress 2.1.2 .

    The first problem was that bbPress didn’t switch from one language to another, always keeping the default WordPress language. I solved this calling again bbpress()->load_textdomain() before loading the header template:

    function cbp_bbPressTranslate(){
    bpress()->load_textdomain();
    }
    add_action('get_header','cbp_bbPressTranslate');

    This worked great, but soon other problem appeared. If topics and replies doesn’t have translations, they doesn’t show up. I can add translation posts for they from the admin panel, but of course my users can’t. I’ve isolated the problem to the Polylang plugin: switching back to Twenty Eleven theme and deactivating all plugins but Polylang didn’t do anything. Deactivating Polylang showed the topics again.

    Anyone can help me? Encouraging words will be welcomed too! :D

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

  2. dr_who20
    Member
    Posted 1 year ago #

    Can you exactly explain what you did with bbpress. I would like to see if it also works for buddypress

  3. JoanBotella
    Member
    Posted 1 year ago #

    Put this code on your theme's functions.php file:

    function myTheme_bbPressTranslate(){
        bbpress()->load_textdomain();
    }
    add_action('get_header','myTheme_bbPressTranslate');

    That will make bbPress to reload language files before the theme's header.php file shows. At this time, Polylang has already switched the language and bbPress appears translated.

    That doesn't fix the problem I was explaining, so, if you use bbPress with buddyPress, you will have that same issue. Tell us how it worked for you!

  4. dr_who20
    Member
    Posted 1 year ago #

    The script did not worked for me cause i did not got the myTheme part straight. But no problem, the new bbpress update v2.2 fixed the problem wonderful. Bbpress is now changing language nicely.
    I have separate Forums for each language and it works great for me. I dont need the topics to be translated cause every country has its own replies and topics. I configured as follows:
    Example:
    English: Forum => Latest News
    Dutch: Forum => Laatste Nieuws
    etc.
    I also managed to get buddypress compatible with Polylang. If you would like to know how check link: Polylang Buddypress compatible

  5. JoanBotella
    Member
    Posted 1 year ago #

    The myTheme part was only a prefix to the function name. Many of the WordPress functions are globals, so for avoiding collisions, I add the theme or plugin name as a prefix to my functions name. Anyway, it's just the function name, so you can use 'myTheme_bbPressTranslate' and it should work.

    Finally, I quit trying bbPress translation and installed phpBB. Thanks for letting me know about that update, I'll study it. Registering twice, for commenting my blog and posting on my forum, it's a good way for losing users.

    I'm not using buddyPress now, but I'm sure your other post will eventually become very useful for me. Thanks!

  6. gr0uch0mars
    Member
    Posted 1 year ago #

    Hi, do you have any fix for translating topics and replies?
    The only way I can make it to work is deactivating PolyLang "Topics" and "Replies" from the settings panel.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags