Skip to:
Content
Pages
Categories
Search
Top
Bottom

localisation issue of mo file

  • Hi, I’ve installed the 0.8.3.1 version into the wordpress v2.3.2 directory.

    I tried to localise bbpress in french using the fr_FR.mo found in http://www.adilade.fr/blog/41/bbpress-traduction-francaise.html#comment-281

    But when I add the french mo file in bbpress/bb-includes/languages, and the line

    define(‘BBLANG’, ‘fr_FR’);

    into config.php file

    I’ve the Fatal error: Cannot redeclare class cachedfilereader in E:wampwwwhyporecrs_next2bbpressbb-includesstreams.php on line 163

    After many hours of research and tests, the problem seems to be due that there is a confict between wordpress fr mo file and the bbpress one.

    Note that to use the header and the footer from wordpress in bbpress, I’ve added:

    define(‘WP_BB’, true);

    if ( !defined(‘DB_NAME’) ) {

    require_once( dirname(__FILE__) . ‘/../wp-config.php’);

    }

    into the config.php file

    (the bbpress template could then use get_header(); and get_footer(); of wordpress which is very convenient)

    Please how can I solve this issue ?

    thanks in advance

Viewing 10 replies - 1 through 10 (of 10 total)
  • Same problem here: latest versions of WP and bbPress, FR_fr .mo gives same error message (Cannot redeclare class cachedfilereader).

    If I get rid of the FR language setting everything works fine.

    Maybe it is because WP and bbPress use the same localization routines…

    I think one solution would be to merge the .mo files of both apps into one so we have to load only one language file. Because apparently if I load only the WordPress FR localization I see that common terms in bbPress are translated.

    I don’t know much about .mo files, does anyone have a clue on how to do that?

    I found the solution!

    I merged the two language files into one (using gettext msgcat GNU utility)

    I load the new merged language file in WordPress wp-config

    I don’t load any language file in bbPress config

    It works! everything is translated in WordPress + bbPress


    Sam Bauers
    Participant

    @sambauers

    Can you post the command you used to merge?

    @sambauers

    something like this if I remember well:

    > msgcat fr_FR_wp.po fr_FR_bbp.po > fr_FR_merged.po

    Then I used poEdit.exe to manually edit the conflicting translations (same key with different translation between the two packages) – only about 30 of them.

    Then I saved in poEdit, which automatically creates the corresponding .mo file.

    Had a hard time finding how to merge .po files on the Web, seems there’s not so many other ways to do it. This one worked for me.

    I’ll create a special page on my blog to document this if I have time and get lotsa requests.


    CoreForce
    Member

    @coreforce

    Having trouble with localization as well.

    It works on my local Windoze system without problem, switched to German very smoothly.

    But not on the hosted Linux server, shows English only.

    Configuration is 100% identical.

    Any ideas what might be wrong with it?

    I’m on bbpress-0.8.3.1

    Thanks.


    CoreForce
    Member

    @coreforce

    In addition to what I’ve said above:

    If I include a <p><?php echo(constant(‘BBLANG’)) ?></p> into one of the template this renders me the correct value for the language setting, therefore it’s really strange this one is not resolved into the right call to the language file. The $mofile variable in bb-includes/i10n.php is pointing to the right file. …


    CoreForce
    Member

    @coreforce

    Some tracing shows that it heads for the right language file but the check for the magic number fails in gettext.php , constructor gettext_reader for some strange reason. The same file works fine on windows, trnsferred it binary to the server, has same byte length.

    I see that there has been some work in that space because of a bug in PHP 5.0.2?

    I’m on FreeBSD 6.3 Release p1, Apache/2.2.6 (FreeBSD) and PHP 5.2.5.

    Any insight on what’s going on here?

    Thanks.


    CoreForce
    Member

    @coreforce

    As I hardcode byteorder to 0 (zero) everthing is fine.

    Something is wrong with the magic number check for byte order validation.


    Sam Bauers
    Participant

    @sambauers

    There were some issues with the stream reader class and 64 bit processors if I remember correctly.

    That should be fixed in the next version of bbPress – maybe you can see if this function makes sense to you:

    http://trac.bbpress.org/browser/branches/0.8/bb-includes/gettext.php#L98

    Maybe you could test against the next release for us? Just grab the zip file from the bottom of this page:

    http://trac.bbpress.org/browser/branches/0.8


    CoreForce
    Member

    @coreforce

    I need some more time on this one, but I will certainly do.

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

You must be logged in to reply to this topic.