WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] define ('WPLANG', 'nl_NL'); doesn't work (11 posts)

  1. egostripper
    Member
    Posted 6 years ago #

    Dear WP people,

    define ('WPLANG', 'nl_NL'); doesn't work.

    I have installed this package (which contains WordPress 2.3 with a Dutch theme included, it works for other people on other servers then mine):
    http://www.dolleboel.net/wp/WordPress2_3_NL.tar.gz

    I have changed the wp-config.php to:

    <?php
    // ** MySQL settings ** //
    define('DB_NAME', 'XXX'); // of course fake
    define('DB_USER', 'XXX'); // of course fake
    define('DB_PASSWORD', 'XXX'); // of course fake
    define('DB_HOST', 'localhost');
    define('DB_CHARSET', 'utf8');
    define('DB_COLLATE', '');
    $table_prefix  = 'wp_';
    define ('WPLANG', 'nl_NL');
    define('ABSPATH', dirname(__FILE__).'/');
    require_once(ABSPATH.'wp-settings.php');
    ?>

    Well I started then with the installation, and guess what it was in English.

    I have checked the nl_NL.mo file:
    http://www.dolleboel.net/wp/wp-content/languages/nl_NL.mo

    But for some reason my worpress won't listen to WPLANG, everything is working fine, but I have to set up a WordPress in the Dutch languas and to change all text in the php would be a hell of a job.

    De site is running at --> http://www.dolleboel.net/wp/

    Can somebody help me? Reply in this topic or contact me on tijmen @ dolleboel.net . Any help is appreciated!

    Information of the server it is working on:

    PHP built On: Linux blinkserver.blinkserver.nl 2.6.18-4-amd64 #1 SMP Fri May 4 00:37:33 UTC 2007 x86_64
    Database Version: 4.1.10-standard
    PHP Version: 5.2.3
    Web Server: Apache/2.0.59 (Unix) mod_ssl/2.0.59 OpenSSL/0.9.8c mod_perl/2.0.3 Perl/v5.8.8
  2. egostripper
    Member
    Posted 6 years ago #

    After a tip I tried to put the nl_NL.mo file on two different locations.

    http://www.dolleboel.net/wp/wp-includes/languages/nl_NL.mo
    http://www.dolleboel.net/wp/wp-content/languages/nl_NL.mo

    But there is nothing changed;
    The admin area is still in English.

    The point is, I've changed for another site of mine lot's of php files. But when a new WordPress version is coming out I've got another problem, because all my files will be overwritten and I must do it all again.

    So I hope there is a way I can fix this problem :S

    http://www.dolleboel.net/tjek.gif

  3. egostripper
    Member
    Posted 6 years ago #

    Solution:

    Find gettext.php in wp-includes. Replace this part

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

    with this:

    if ($magic == $MAGIC1) {
    $this->BYTEORDER = 0;
    } elseif ($magic == $MAGIC2) {
  4. boblenain
    Member
    Posted 6 years ago #

    Egostripper's solution works for me, thanks a lot :)

  5. traneHead
    Member
    Posted 6 years ago #

    worked for me too, thanks egostripper
    we have version 2.2.2-1 (Ubuntu package) though and now it looks like:

    if ($magic == $MAGIC1 || $magic == $MAGIC3) { // to make sure it works for 64-bit platforms
      $this->BYTEORDER = 0;
    } elseif ($magic == $MAGIC2) {
  6. Melodiefabrieknl
    Member
    Posted 6 years ago #

    I read in the new config-sample that the MO needs to be put into wp-content/languages but for me it still works at wp-include/languages.

    Is this really changed or is that line in config-sample simply not right?

  7. MichaelH
    Member
    Posted 6 years ago #

    If it is not in wp-content/languages, then WordPress will look in wp-includes/languages for the mo file.

  8. MichaelH
    Member
    Posted 6 years ago #

    Can confirm that http://trac.wordpress.org/changeset/6488 (similar to egostripper and traneHead's fixes) for 2.3.2 lines 117&118 in wp-includes/gettext.php, using a .mo file, on a BlueHost server, works.

    Other resource:
    http://trac.wordpress.org/ticket/3780

  9. Guta
    Member
    Posted 6 years ago #

    I confirm that it worked for me to in one 64bits server (debian amd64) to set it to spanish.

    Thank you!...because i was going crazy

  10. pianist
    Member
    Posted 5 years ago #

    I've got the same problem. WordPress version 2.6. None of the above helps. I use SiteGround Hosting -> Fantastico. PHP version 5.2.5, MySQL version 4.1, Architecture i686. Tried with German, Russian and Ukrainian Localizations. Still see English on the Screen. Any more Ideas on how to change those lines? Or is it something else?

    Thanks in advance.

  11. pianist
    Member
    Posted 5 years ago #

    Everything works fine now.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags