[wp-trac] [WordPress Trac] #5594: Translations do not work on AMD64

WordPress Trac wp-trac at lists.automattic.com
Sun Jan 6 19:54:07 GMT 2008


#5594: Translations do not work on AMD64
----------------------+-----------------------------------------------------
 Reporter:  szotsaki  |       Owner:  anonymous                         
     Type:  defect    |      Status:  new                               
 Priority:  high      |   Milestone:  2.5                               
Component:  General   |     Version:  2.3.2                             
 Severity:  major     |    Keywords:  translation, AMD64, gettext, patch
----------------------+-----------------------------------------------------
 Even tough I installed the Hungarian language pack correctly (copied into
 the languages folder and changed the wp-config.php file) Wordpress did not
 recognise the new settings and used English as its default language.

 I figured out (with this post:
 [http://wordpress.org/support/topic/36104?replies=3#post-204361]) that
 there is a bug in the ''wp-includes/gettext.php'' file.

 I had to change a line (+ $magic == $MAGIC1) and everything works fine!

 Here is the patch:


 {{{
 --- gettext.php 2008-01-06 21:47:28.000000000 +0100
 +++ gettext.php 2008-01-06 21:38:13.000000000 +0100
 @@ -114,7 +114,7 @@

                 $this->STREAM = $Reader;
                 $magic = $this->readint();
 -               if ($magic == ($MAGIC1 & 0xFFFFFFFF) || $magic == ($MAGIC3
 & 0xFFFFFFFF)) { // to make sure it works for 64-bit platforms
 +               if ($magic == ($MAGIC1 & 0xFFFFFFFF) || $magic == ($MAGIC3
 & 0xFFFFFFFF) || $magic == $MAGIC1) { // to make sure it works for 64-bit
 platforms
                         $this->BYTEORDER = 0;
                 } elseif ($magic == ($MAGIC2 & 0xFFFFFFFF)) {
                         $this->BYTEORDER = 1;

 }}}

 My system:[[BR]]
 Linux szotsaki 2.6.23-gentoo-r5 #2 SMP Sat Jan 5 00:14:58 CET 2008 x86_64
 Intel(R) Core(TM)2 Duo CPU T5250 @ 1.50GHz GenuineIntel GNU/Linux[[BR]]
 Lighttpd and MySQL

-- 
Ticket URL: <http://trac.wordpress.org/ticket/5594>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list