HOWTO: make localization work on 64 bit systems
-
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;
}
- The topic ‘HOWTO: make localization work on 64 bit systems’ is closed to new replies.