Support » Themes and Templates » Theme translation

  • I’ve attempted to localize the Whitehouse-theme. I’ve created no_NB.po and files and stored them in /wp-content/themes/whitehouse/language I’ve also changed wp_config.php accordingly – define (‘WPLANG’, ‘no_NO’). I’ve not succeeded in changing the language. Have I done something wrong? Or is the theme not ready for localization? If the latter is true, is there an easy way to alter it to enable localization?



Viewing 7 replies - 1 through 7 (of 7 total)
  • Lars,

    If your WPLANG setting is no_NO, the theme language files should be no_NO.po/mo as well.

    Thanks. I wrote incorrectly in the first post. In wp_config.php it’s – define (‘WPLANG’, ‘no_NO’) and the files are and

    Is there load_theme_textdomain function in your functions.php file? (see Kubrick’s example)

    Is the textdomain defined correctly? For example:
    <?php _e('Not Found', 'kubrick'); ?>

    This is in functions.php:

    	define('TDOMAIN', 'WhiteHouse');
    	define('LANGUAGE_FOLDER', TEMPLATEPATH.'/language');
    	load_theme_textdomain(TDOMAIN, LANGUAGE_FOLDER );

    There’s no other mention of load_theme_textdomain in functions.php Is it defined correctly?

    Seems correct.
    In that case, you should have something like <?php _e('Not Found', 'WhiteHouse'); ?> in your template.

    Are you editing & creating .po/.mo using Poedit?

    In that case, you should have something like <?php _e(‘Not Found’, ‘WhiteHouse’); ?> in your template.

    I assume you’re referring to functions.php as the template. There is no string such as <?php _e('Not Found', 'WhiteHouse'); ?>. I’ve searched the entire theme directory without finding a match for part of the string <?php _e('Not.

    Yes, I’ve used Poedit to translate. I’ve also tried translation with the CodeStyling Localization.

    My problem is resolved. It appears my definition in wp_config.php was the problem. define ('WPLANG', '') should have read define ('WPLANG', 'nb_NO') not as in the above attempts. It appears the correct definition are according to this list.

    The Whitehouse-theme, by the way, is only partially ready for localization.

    Thanks for your help.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Theme translation’ is closed to new replies.