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 Name.ly' 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.