Skip to:

Need help with bp-custom.php

  • Sir Tie


    I’m trying to setup BP with three languages: English (default), Simplified/Traditional Chinese.
    I have added mo and po files (zh-tw and zh-cn) to: wp-content/plugins/buddypress/bp-languages
    (zh-cn and zh-tw)
    And I have added bp-custom.php to wp-content/plugins
    This is the code:

    define( ‘BPLANG’, ‘zh-cn’ );
    if ( file_exists( BP_PLUGIN_DIR . ‘/bp-languages/buddypress-‘ . BPLANG . ‘.mo’ ) ) {
    load_textdomain( ‘buddypress’, BP_PLUGIN_DIR . ‘/bp-languages/buddypress-‘ . BPLANG . ‘.mo’ );

    define( ‘BPLANG’, ‘zh-tw’ );
    if ( file_exists( BP_PLUGIN_DIR . ‘/bp-languages/buddypress-‘ . BPLANG . ‘.mo’ ) ) {
    load_textdomain( ‘buddypress’, BP_PLUGIN_DIR . ‘/bp-languages/buddypress-‘ . BPLANG . ‘.mo’ );

    Could somebody tell me what am I missing here? I do not see any language changes.
    I am using WPML.

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

  • modemlooper


    Open your wp-config.php file, find text below

    define (‘WPLANG’, ”);

    change to:

    define (‘WPLANG’, ‘zh-CN’);

    Sir Tie


    Thanks for your reply @modemlooper but could you help me to understand this a bit further please.
    From what I see, your recommendation is referring to “WP in your language”:
    that talks about converting WP into your local language that you would preffer to use for admin and public.
    where the language files come from the corresponding wp install zip for that specific language
    In my case I downloaded WP from
    and and extracted and files that I then added to my /wp-content/languages
    with the following modification to wp-config.php file
    define(‘WPLANG’, ‘zh-cn’);
    define(‘WPLANG’, ‘zh-tw’);

    1. is this correct? Can you declare multiple languages this way? And if so, how does one go about switching from one to another?

    Now, back to my original question about translating BuddyPress
    From what I found here:
    it provides different language files:

    As I understand these are only for BuddyPress plugin and not WP in general.

    Once downloaded and converted to .mo files you can use them to translate BuddyPress
    by adjusting bp-custom.php

    2. Now, I am not sure how does WP translation corresponds to BP translation. The way I see it they are separete and need to be done separatly by going through steps above. Is this correct?

    3. Also, how to go about declaring multiple languages in both: wp-config.php and bp-custom.php and then switching between them.

    Could someone clarify these points please. I am new to WP and figuring this out takes way too much time. I hope I am on a right track.

    Thanks forum!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Need help with bp-custom.php’ is closed to new replies.
Skip to toolbar