It seems that thereīs an issue with the gettext library and wordpress running on x64 based machine. Basically itīs a byte addressing issue regarding the language files located at wp-includes/languages. The system cannot read the .mo file them it loads default english captions.
For Wordpress 2.3.2 open wp-includes/gettext.php and at line 105 find:
Then change it to:Code:// Caching can be turned off $this->enable_cache = $enable_cache; // $MAGIC1 = (int)0x950412de; //bug in PHP 5.0.2, see https://savannah.nongnu.org/bugs/?func=detailitem&item_id=10565 $MAGIC1 = (int) - 1794895138; // $MAGIC2 = (int)0xde120495; //bug $MAGIC2 = (int) - 569244523; // 64-bit fix $MAGIC3 = (int) 2500072158; $this->STREAM = $Reader; $magic = $this->readint(); if ($magic == ($MAGIC1 & 0xFFFFFFFF) || $magic == ($MAGIC3 & 0xFFFFFFFF)) { // to make sure it works for 64-bit platforms $this->BYTEORDER = 0; } elseif ($magic == ($MAGIC2 & 0xFFFFFFFF)) { $this->BYTEORDER = 1; } else { $this->error = 1; // not MO file return false; }
Note the "& 0xFFFFFFFF"s have to be wiped out. Now Wordpress can recognize your .mo file under x64 architecture machines and load the correct language file. Please test it and post any questions, for me it worked.Code:// Caching can be turned off $this->enable_cache = $enable_cache; // $MAGIC1 = (int)0x950412de; //bug in PHP 5.0.2, see https://savannah.nongnu.org/bugs/?func=detailitem&item_id=10565 $MAGIC1 = (int) - 1794895138; // $MAGIC2 = (int)0xde120495; //bug $MAGIC2 = (int) - 569244523; // 64-bit fix $MAGIC3 = (int) 2500072158; $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; }
P.S: Based upon wordpress and gettext forum threads.


Reply With Quote



