Translation file + display issue

hi !

Decidec to update buddypress and studio this night but bad surprise with the translation file.

I updated my po file from the new en po file AND also try to update from source but there is a problem the translation does not apply :slight_frown:

specially in the panel on front page.

I precise that if i update from source, all backoffice strings disapears

Other thing, the feature section now display the title on the colored zone (green for me)

url : http://passion-cheval.net

thanks !

  • Aphrodite
    • The Reaper

    no i dont have any custom syle.

    If i uncomment the lines in function.php i have

    Parse error: syntax error, unexpected ',', expecting ')' in /home/mgr/public_html/wp-content/themes/studio-child/functions.php on line 5

    huh guy is thi linenormal in main theme function.php :

    define('TEMPLATE_DOMAIN', 'bp_magazine');

  • Tammie
    • WordPress Wizard

    That one line is the only difference there is no other bp_mag reference. Your file should work for translation using that new functions.php.

    What lines exactly are you removing in functions.php as you shouldn't have to with the new functions.php? Also not sure what sutio or bp_mag is as neither are referenced... do you mean Studio?

  • Tammie
    • WordPress Wizard

    The way translation works is it either works fully or doesn't work at all. It makes no sense or even would only work partially like this.

    I need you to recompile and check your language files again to be sure. That part wasn't even edited in the recent update the functions.php was yes but footer.php was not. You also have a fix for functions.php which if you are using in the parent theme and / or child if required, should be solving that one issue I fixed.

  • Tammie
    • WordPress Wizard

    Where have you put your language files?

    See this:

    load_theme_textdomain(TEMPLATE_DOMAIN, get_template_directory() . '/languages/');
    	$locale = get_locale();
    	$locale_file = get_template_directory() . "/languages/$locale.php";
    	if ( is_readable( $locale_file ) )
    		require_once( $locale_file );

    In functions.php. We're using this for our themes according to theme guidelines.

    If you are not putting your files under languages/ can you try that please?

  • Tammie
    • WordPress Wizard

    One of the issues previously was with people updating the parent theme and loosing files. As a result the path for languages is a folder that doesn't exist in the theme. I said this on the theme release but don't worry I'll make sure this also gets put into documentation if is the issue.

    If you don't have that folder please create it and put your file in there.

  • Tammie
    • WordPress Wizard

    Ok lets take a few steps back here as I can do this using the file I gave you so...

    1. Grab the functions.php zip attached to this comment as I just put it back on here and used the same one. Put this in your parent theme.

    2. In your wp-config make sure you have the following set to your language:

    define('WPLANG', 'en_EN');

    Ie; maybe fr_FR.. or whatever language you are using.

    3. Then in your parent theme make sure you have a folder called languages at root.

    4. Then make sure you save your language file as fr_FR or whatever country code you are using.

    Then clear any caches you may have and lets see where you are at please.

  • Tammie
    • WordPress Wizard

    Just for information off the back of this being a little issue I've updated my themes with a few things to hopefully make this easier:

    1. I actually made a languages folder at root - whilst the worry of copying over is there I think it's causing more issues the other way around.

    2. I added a howto file in the languages folder to hopefully make things easier for people.

    Hopefully we can get your issue resolved and make it easier as a result for others to translate.

  • Aphrodite
    • The Reaper

    the issue with slugs is not a translation problem but slug problem. If I set a specifica slug for "activity" to "activites", the page works fine with BP on a direct call but the links in the panel remain default ones : activity.

    The translation is fully operationnal also in the panel.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.