Support » Fixing WordPress » Upgrade now getting Warning: Missing argument 2 for translate() ??

  • Warning: Missing argument 2 for translate() in /home2/rareexc/public_html/seobrien/wp-includes/l10n.php on line 20

    What’s going on??


Viewing 5 replies - 1 through 5 (of 5 total)
  • I’ve got this one too. Something is calling the translate() function in the wp-includes/l10n.php file, but isn’t passing is an argument for $default.

    The problem does not seem to be in the wp-includes/l10n.php file. There are a few wrapper functions which call translate(), but all of them seem to have two appropriate arguments.

    Does anyone know where translate() might be elsewhere in the wordpress files?

    Investigation continued…

    The warning still appears on my blog’s mainpage after I turned all plugins off.

    I didn’t find “translate(” anywhere else but in wp-includes/gettext.php, and in that file, the function is completely different: with one argument translate($string).

    Still stumped.

    I don’t know if this is the same for you guys, but I was using WP-Translate, and got the same error you did after upgrading (actually, I had to rename the WP-Translate directory to deactivate it to get WP to work after teh upgrade).

    The place that I got the error was in my footer, where I had added the code for the flags for the translator — I removed the code and the error went away (so JUST disabling the plugin wasn’t enough).

    Unfortunately, I don’t know php well enough to know what call is missing or misinterpreted, so will wait for more folks to have problems with this plugin. 🙂

    hope this helps.

    Nice, pearce!

    That’s exactly what it was. WP-translate is somehow broken. Thanks.

    I’ll go look at the plug-in files and see if I can find anything.

    Just to clarify, here’s the (temporary) solution for this issue:

    1. Login to your blog as administrator
    2. Go to Manage > Files
    3. Search for code that looks like this:

      <?php translate(2); ?>

      It is most likely in one of the following files: Header, Page Template, Sidebar, or Footer.
      If you still can’t find it, try searching for:

      <?php translate(1); ?>

    4. Comment out the code, like this:

      <!--<?php translate(2); ?> **Commented out: WP-Translate plug-in causes php warning.**-->

    5. Note: This problem may occur for anyone who has used WP-Translate or one of its derivatives, like Robs Translator.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Upgrade now getting Warning: Missing argument 2 for translate() ??’ is closed to new replies.