Forums

[resolved] .mo file and translation, not working after server upgrade (5 posts)

  1. Radja
    Member
    Posted 1 year ago #

    hello, I have this problem.
    My WP 2.3.1 was working fine, but after provider upgraded his server, the translation using .mo file now don't work.

    Don't you know, what is necessary on server side to make the translation work again? I have found that translation works through l10n.php file, but that's all I know about that problem

  2. moshu
    Member
    Posted 1 year ago #

    WP is using gettext for localization.
    See details here:
    Translating_WordPress#Localization_Technology

  3. Radja
    Member
    Posted 1 year ago #

    OK thanks, but webhosting seems to have gettext installed.

    I know it's weird, also provider himself do not know why it is not working correctly.

    server has: Apache/2.2.6 (Unix) mod_ssl/2.2.6  DAV/2 PHP/5.2.5

  4. moshu
    Member
    Posted 1 year ago #

    Searching for "localization php 5" brought up this (among other hits):
    http://wordpress.org/support/topic/111460?replies=4

  5. Radja
    Member
    Posted 1 year ago #

    the server has 64bit system; which is mentioned here as possible problem: http://source.ibiblio.org/trac/lyceum/ticket/652
    http://comox.textdrive.com/pipermail/wp-trac/2007-June/012844.html

    but gettext.php in (/wp-includes) seems to have this problem already solved; as mentioned in above tracs

    SOLVED: I tried to remove code that was supposed to solve problem with 64bit system, and IT WORKS

    all I had to do, was this code:

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

    change to this:

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

    i.e. remove hack that was made to make it compatible with 64bit systems, strange

Topic Closed

This topic has been closed to new replies.

About this Topic