• WordPress’ localization support seems to be broken on 64bit systems. Apply the changes as described below to wp-includes/gettext.php to make it work. You will need to add one line and change another.

    (around line 100 in gettext.php:)


    $this->enable_cache = $enable_cache;

    // $MAGIC1 = (int)0x950412de; //bug in PHP 5
    $MAGIC1 = (int) - 1794895138;
    // $MAGIC2 = (int)0xde120495; //bug
    $MAGIC2 = (int) - 569244523;
    $MAGIC3 = (int) 2500072158; // <- 64 BIT FIX: ADD THIS LINE!

    $this->STREAM = $Reader;
    $magic = $this->readint();
    if ($magic == $MAGIC1 || $magic == $MAGIC3) { // <- 64 BIT FIX: CHANGE THIS LINE!
    $this->BYTEORDER = 0;
    } elseif ($magic == $MAGIC2) {
    $this->BYTEORDER = 1;
    } else {
    $this->error = 1; // not MO file
    return false;
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thanks ! I was getting mad with this ! The problem occured for me on version 2.0.5 and I finally sorted it out with your solution.

    Hi

    It worked just fine to fix my admin panel and my date formatting that had changed fom french to english for no reason a few days ago. This solution brought everything back in french.

    Efficient and simple

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘HOWTO: make localization work on 64 bit systems’ is closed to new replies.