Support » Fixing WordPress » Wrong translation randomly loaded

  • Resolved kemtox


    Hi everyone!

    I really hope someone will be able to help me as I have posted this problem on many forums (french forums) without any answers.

    I’m french and installed the french version of WordPress 3.4.1. I also use a french theme. 99% of the time, my page loads in french (which is good). However, sometimes, for no reason, it loads in english (which is obviously the default language).

    The Website:

    Here are some thoughts and things I tried:

    1) Already checked WPLANG and it is set to “fr_FR”. Downloaded my entire website folder. Opened ALL the files, searched for all instances of “define(WPLANG” with Notepad++, all of them are ok.

    2) All the PO and MO files are “fr_FR” (both in wordpress and my theme)

    3) When the page render in english rather than in french, the Dashboard is ALSO in english.

    4) I tried deleting or renaming existing en_US PO and MO files.

    5) I emptied my browser cache, history or everything.

    6) Got this problem on IE8, IE9, Chrome, Firefox and Safari

    7) No translation plugin installed

    8) All other plugins are native-english so I hard-translated them in french (I know this is mean…)

    9) Recompiled my PO files in MO (or the inverse…?) with POEdit

    10) The problems seems to happen when I load my page the first time. But sometimes, it just get in english while working in the dashboard.

    11) I use jQuery on the vast majority of my pages.

    I Guess there is still a lot to try but for now, I’m completely overwhelmed!

    Thanks in advance for all your help and have a nice day! 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • A plugin or theme does not work properly with language files…simply isolate the issue by activating default unedited theme and deactivating all plugins…my guess is a poorly optimized plugin and oft server caching. With caching off, test by activating one by one to isolate issue.

    Thanks for your answer. I already started to test your idea as I found my website was rendering at turtle speed on certain computer (which wasn’t the case before). I think the problem might be with a META data plugin…

    already started to test your idea

    This is not ‘my idea’…it is well founded troubleshooting steps…

    Hi there!

    Here are some feedbacks.

    1) I activated WordPress basic theme.
    2) I deactivated every plugins.
    3) The problem still happens.

    The problem seems to happen more often when I F5 my webpage afin 1-2 hours of inactivity though. But it also happens when I use it.

    I guess it has something to do with WordPress reloading languages files.

    I was also wondering:
    1) Can a PO/MO file be too big/long to load so sometimes, the website doesn’t have the time to load it before it renders?

    2) If so, is there a way to tell the website to wait until it is completed?

    3) Could this be a PHP bug? With the “define” command. I know “define” handles constants. I already did an “echo WPLANG;” for debug purpose and it was always showing me “fr_FR” even when it was not translated.

    Thanks a lot! 🙂

    Some more test I done:

    1) Tested it from 7-8 places in the world using and it looks like the first rendering is always mistranslated in english.

    2) Tried hard coding the l10n.php file to set the $locale global variable to “fr_FR”. Random translations still present.

    3) Downloaded fresh version of all the french MO and PO files for WordPress. No changes.

    4) Changed some constant in wp-config.php such as the max memory allowed.

    5) I ran P3 Plugin Performance Profiler. My plugins take half a second to load. (all 9 of them)

    6) Also checked exploits with a plugin. No exploits found.

    7) I read at many places that GoDaddy’s server were somehow slow with WordPress (mainly because of databases). But I don’t get timeout errors and the website loads in 6-10 seconds, which is acceptable.

    Hope this help!

    So here’s the solution.

    Avoid GoDaddy’s shared WINDOWS server. They are slow, like ridiculously slow, with Times to first byte as slow as 12-15 seconds if you are unlucky enough.

    Somehow, their servers time out, or can’t cache the language files fast enough, or whatever.

    I switched to a LINUX shared server. The website renders in 2-3 seconds and the problem has not reappeared. Here’s to change your hosting from a windows platform to linux.

    If you find that you need to switch the operating system of your hosting account, you can do so at any time.

    To Switch Your Hosting Account Operating System

    Log in to your Account Manager.

    Click Web Hosting.

    Click Options next to the account you want to use.

    Go to the Customize tab.

    From the Plan menu, select a new hosting plan.
    NOTE: If you do not see the Plan menu, contact customer support.

    Click Save Changes or Checkout, and then complete your purchase.

    This change may make take up to 72 hours depending on the size of the site, the number of databases and other factors that may increase the complexity of the migration. We recommend that you do not try to FTP to your hosting account during the migration. You will receive an email message when we complete your upgrade.

    NOTE: If your website contains certain advanced features, such as ASP, ASP.NET, CGI, or PHP applications and you select a hosting plan that does not support those advanced features, your website may no longer function properly after the plan change. Please make sure your website does not contain advanced features BEFORE moving to a plan that may not support them or be prepared to modify your Web content accordingly.

    NOTE: If you created databases that are incompatible with the new operating system, you must delete them before proceeding. Data existing in compatible databases will be preserved.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Wrong translation randomly loaded’ is closed to new replies.