Theme translation not working
-
Hi there folks!
I bought a nice lloking commercial theme on themeforest which makes me and my client absolutely happy….except for one tiny little darn bug: the translation is not working! The theme is supposedly translation ready via .po files but I cannot get it to load the file contents in any way.
The theme root contains a languages folder and two .po files. I guess one contains the front end strings and the other one the admin’s strings. I’ve read on the Codex that this folder should only contain files named after the different locales codes, like it_IT.po or de_DE.po and default.po. This folder instead contains these two files named percivale.po and percivale-1.po. After inspecting the theme’s functions.php file I can say that ‘percivale’ should be the theme textdomain and the strings are called inside the theme in this way:
<?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'percivale' ); ?>
in functions.php, anyway, the translation job is handled by the following function:
load_theme_textdomain( TEMPLATEPATH . '/languages' ); $locale = get_locale(); $locale_file = TEMPLATEPATH . "/languages/$locale.php"; if ( is_readable( $locale_file ) ) require_once( $locale_file );
which is confusing me…I tried to correct the script but with no result….I think the theme’s author re-used the code from a previous theme (percivale) and therefore messed up something with the theme’s textdomain, but I cannot get any support and cannot find a solution myself….Anyone could please help?
Thanks!
- The topic ‘Theme translation not working’ is closed to new replies.