Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a theme that was bought from themefuse and they say it supports localisation using a plugin called CodeStyling Localization

However even though I make the necessary steps to translate strings in the theme, the translated texts do not appear in the frontend.

The steps I have taken:

  1. installing plugin
  2. scan the theme
  3. translate a few words
  4. build "mo" file from plugin menu
  5. empty cache + refresh ... no result

Any ideas?

share|improve this question
1  
Desired language is setted correctly in wp_config.php? If so it's impossible to answer without look at the code. –  G. M. Aug 19 '13 at 18:51
add comment

1 Answer 1

up vote 1 down vote accepted

Check the wp-config.php file and see if your language is defined :

 define('WPLANG', 'your_language');

You could add this if you're still stuck:

add_action('after_setup_theme','wpse_110727_translate_theme');
function wpse_110727_translate_theme() {
     load_theme_textdomain( 'textdomain', get_template_directory() . '/languages' );
     $locale = get_locale();
     $locale_file = get_template_directory() . "/languages/$locale.php";

         if ( is_readable( $locale_file ) ) require_once( $locale_file );
 }

Just put the translation files into a repertory called /languages/ and upload all files in the root of your theme.

See if it works now. Hope this helps.

EDIT: 'textdomain' is the word used in all translation strings :

_e('some content','textdomain');

share|improve this answer
    
The default language was not set in wp-confing thank you! –  mugur Aug 19 '13 at 19:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.