Responsive WordPress Theme – Caliber

A theme with simple controls and limitless potential. Work fast and build an amazing website!   Find out more »

UpThemes – Beautiful WordPress Themes

Create a site your church, gallery, newspaper, blog, recipes, band and more!   See the themes »

Need a little help?  Find answers quickly by searching the forum.
Group Admins
  • jeffw
  • andy

Support for: Mingle – Multi-purpose WordPress Theme

Mingle (WordPress)

Public Group  |  active 7 months ago ago
Viewing post 1 to 15 (18 total posts)

BuddyPress translation and localisation

  • danicastillejos

    said

    ¡Hey! Congrats on your theme, ¡I love it! I was just wondering if there was anyway to customize the buddy press pages, my site is in Spanish, but pages are in English by default… any idea on how to do this?

    Thks a lot!
    D

  • andy

    said

    You can translate the theme files with Poedit using the included translation file “assets/translation” where we have the PO/MO files. Set the translation file to be used in the “functions.php” file which you will find already has a reference (commented out) for how this is accomplished.

    http://www.poedit.net/

    For translating BuddyPress content you’ll likely also need to use their translation files:

    http://buddypress.org/community/groups/localization/forum/
    http://buddypress.org/community/groups/localization/

  • Bikuler

    said

    Sorry, but I am a little bit confused how to translate the theme to german, as on my site
    http://www.sternstunden.org/aktivitaten/
    the language is still mixed english and german.

    Also in the admin menu of Buddypres it is still only in english.

    I found four places with language files

    wp-content/languages/
    (where I installed the german Wordpress de_DE.po and de_DE.mo files)

    wp-content/buddypress/bp-languages/
    (where I installed the german buddypress de_DE.po and de_DE.mo files)

    wp-content/buddypress/my-languages/
    (where I installed the german buddypress files again after reading to do so in the bb-config.php from the root directory)

    and at least your file
    wp-content/themes/parallelus-mingle/assets/translation
    (which I left untouchhed so far)

    Which files do I have to change, or is there something wrong with my buddypress installation?
    Are there german users here?

    Thanks for deconfusing me!

  • facebuko

    said

    I edited and upload .mo and .po to assets/translation with en_PH name.
    I also uncommented that line from theme’s functions.php

    But it is not working.

  • andy

    said

    If you translate the theme for BuddyPress and use the theme’s translation file, it is usually necessary to declare the translations twice since most of the theme files use the ‘buddypress’ language tag instead of the theme’s ‘THEME_NAME’ in the text translation functions. This can be done by entering the following in “functions.php“:

    global $locale;
    $locale = get_locale();
    load_theme_textdomain( THEME_NAME, THEME_DIR . 'assets/translation' );
    load_theme_textdomain( 'buddypress', THEME_DIR . 'assets/translation' );

    The second entry load_theme_textdomain( 'buddypress', THEME_DIR . 'assets/translation' ); is the only addition to what’s already in the file.

  • Bikuler

    said

    Thanks Andy
    but I am still confused.

    I put the german Buddypress language files de_DE.po and de_DE.mo in the folder
    wp-content/themes/parallelus-mingle/assets/translation

    then I changed the function.php

    global $locale; $locale =
    $locale = ‘de_DE’;
    load_theme_textdomain( THEME_NAME, THEME_DIR . ‘assets/translation’ );
    load_theme_textdomain( ‘buddypress’, THEME_DIR . ‘assets/translation’ );

    I still have this mixed English/German mess on:
    http://www.sternstunden.org/aktivitaten/

    For instance:
    admin created the group Allgemeines

    When I look at the German Buddypress file (now also in wp-content/themes/parallelus-mingle/assets/translation)
    I see that it is translated:
    %s created the group %s = %s hat die Gruppe %s erstellt

    Same with the word active:
    Active = aktiv

    Why is that not working in the site?

    Thank you very much

  • andy

    said

    There is an error in this code you posted:

    global $locale; $locale =
    $locale = ‘de_DE’;
    load_theme_textdomain( THEME_NAME, THEME_DIR . ‘assets/translation’ );
    load_theme_textdomain( ‘buddypress’, THEME_DIR . ‘assets/translation’ );

    On that first line you should remove the incomplete variable assignment: $locale =

  • Bikuler

    said

    Thank you Andy
    I changed that to

    global $locale;
    $locale = ‘de_DE’;
    load_theme_textdomain( THEME_NAME, THEME_DIR . ‘assets/translation’ );
    load_theme_textdomain( ‘buddypress’, THEME_DIR . ‘assets/translation’ );

    but it does not seem to have any effect…

    Do I have to change something in this code ? For instance is THEME_DIR a placeholder for something?

  • andy

    said

    @Bikuler

    THEME_DIR is a variable/constant. You should not need to change anything in the code posted above.

  • andy

    said

    I think you didn’t translate the included MO/PO file that comes with the theme, correct me if I’m wrong. But have you opened the file “assets/translation/en_US.po” in Poedit and made the translation and saved it as “de_DE.po“? Just copying the BuddyPress translation file will not work. In fact, the BP translation file should be placed somewhere else as described by the BP documentation. You must translate the theme’s PO file if you want the theme strings translated because BP doesn’t have these strings in their file.

  • Bikuler

    said

    Thanks Andy

    It worked somehow. I translated most of the en_US.po and saved it as de_DE.po

    But still I have some words I could not find in all of the de_DE.po files, and if I found them they were translated already.

    http://www.sternstunden.org/aktivitaten/

    “changed their profile picture”
    “the group”
    “wrote a new post”
    “weeks” “days” “hours” “ago”
    “acitve” “popular”

    “Members”
    “Viewing members 1 to 1 (of 1 members)”
    “Public Group”
    “Viewing group 1 to 6 (of 6 groups)”
    “Search Groups”
    “There are no users currently online”

    really confused, but a step further :-)

  • baiaz

    said

    Hmmmm Is it so that I download the Po and MO files and open then up in poedit and edit them and upload the again to the server?

    Also – I have to add these lines:
    global $locale;
    $locale = get_locale();
    load_theme_textdomain( THEME_NAME, THEME_DIR . ‘assets/translation’ );
    load_theme_textdomain( ‘buddypress’, THEME_DIR . ‘assets/translation’ );

    to the “function.php“:

Viewing post 1 to 15 (18 total posts)
Topic tags: Buddypress