Support » Fixing WordPress » Theme localization stopped working on live server

  • I’ve been working on the custom theme, changed text domain (from ‘janecki’ to ‘frontier’ and translation stopped working on my live host. I’ve changed _e() domain for strings as well, it’s ‘frontier’ now. And wp language is en_US, so I’m applying .mo/.po translations to English version. Here is my code in functions.php:

    /* Translations */
    load_theme_textdomain( ‘frontier’, get_template_directory() . ‘/languages’ );

    $locale = get_locale();
    $locale_file = get_template_directory() . “/languages/$locale.php”;
    if ( is_readable( $locale_file ) )
    require_once( $locale_file );

    This code came from default Twentyeleven theme. Hard to say what exactly have happened and when, but everything works fine on localhost, not on the live server.

    What has been done to solve a problem. I’ve done:

    • a downgrade to WordPress 3.2.1,
    • turned off all the plugins,
    • deleted and re-installed my custom theme,
    • backed-up database, loaded it on localhost (localization worked!), I’ve even tried to find a piece of data in DB,
    • entered a string to translate in Twentyeleven, (localhost gave me translation, but not live site.

    Nothing helped. BUT ‘Quick Localisation by’ plugin made translation work again, it only works with that plugin turned on (maybe some others will do the job as well, I dunno).

    So, please guys, give me any ideas, what’s going on there! It’s driving me crazy. What should I check to make it tick again.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Did you ever find a solution for this? I have the same issue. Translation was working ok and now it’s not.

    I tested on my localhost and the original twentyeleven reads the translation files but my new theme is not (with or without multisite).

    I built this new theme a long time ago including translations and was working ok, now it;s not.

    Yeseniagn, my site was moved to another server and I’ve checked translation today… it was working! Yet, I haven’t ever encountered this issue on any site again. So my guess is to ask your hosters for help, maybe they could give an answer.

    Please, post your solution to this, if you’ll have any luck.

    You can try CodeStyling Localization plugin. By the way, I’ve seen strange behaviors in admin dashboard those days with this plugin too, before changing a server, now it’s all gone.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Theme localization stopped working on live server’ is closed to new replies.