WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Language set up problem (portuguese) (9 posts)

  1. studio224
    Member
    Posted 8 years ago #

    I have just installed a fresh copy of WP202 and I am trying to localize it in Portuguese. I have followed the instructions, changed and uploaded my wp-config.php:

    define ('WPLANG', 'pt_PT');

    Created a languages folder under wp_includes and uploaded the correponding language file: pt_PT.mo

    Nothing. WP is still in english. I uploaded the other portuguese language file: pt_PT.ISO-8859-1.mo and still nothing. Everything is in english.

    Short of translating everything thing in every php file... I don't know what to do. Any ideas?

    AClaire

  2. stephenju
    Member
    Posted 8 years ago #

    Does you PHP have gettext support?

  3. studio224
    Member
    Posted 8 years ago #

    Hmmm, I don't know, let me check.

  4. studio224
    Member
    Posted 8 years ago #

    I have just checked it, yes Gettext is enabled.

  5. stephenju
    Member
    Posted 8 years ago #

    What kind of server is it? Maybe the server itself doesn't have your language's locale support?

  6. studio224
    Member
    Posted 8 years ago #

    It must have because when I installed b2bevolution to test it, the localized portuguese version worked perfectly. I have other sites in portuguese on this server (I have a shared hosting) and it works perfectly.

    I am baffled! If I don't solve this I'll have to work with b2bevolution although I don't like it, but my blog needs to be in portuguese. Damn! WordPress is a much stabler application...

  7. studio224
    Member
    Posted 8 years ago #

    I have just made another test, I have tried to localize WP in french, it doesn't work either.

  8. studio224
    Member
    Posted 8 years ago #

    Well, I have solved it. But it's really weird. I have applied a solution that's supposed to solve problems with PHP5, although my server is using Version 4.4.2.

    So in gettext.php I replaced:

    // $MAGIC1 = (int)0x950412de; //bug in PHP 5
    $MAGIC1 = (int) - 1794895138;
    // $MAGIC2 = (int)0xde120495; //bug
    $MAGIC2 = (int) - 569244523;

    with:

    $MAGIC1 = (int)0x950412de; //bug in PHP 5
    //$MAGIC1 = (int) - 1794895138;
    $MAGIC2 = (int)0xde120495; //bug
    //$MAGIC2 = (int) - 569244523;

    I found the solution at the french support forum for WP.

  9. stephenju
    Member
    Posted 8 years ago #

    Glad to hear it's solved. I upgraded to PHP5 a month ago and never have this problem before or after that.

Topic Closed

This topic has been closed to new replies.

About this Topic