Translation-Ready Theme: How To Prepare Your WordPress Blog
If you are working on developing themes for WordPress (which is actually a pretty good way to get free backlinks to your own personal blog), you should consider making your WordPress translation-ready. It will take you less than 1 minute and will certainly increase your theme reach because not everyone speaks and blogs in English.
The very first step is to create a folder called languages in your theme folder.
In a second time, edit the functions.php file of your WordPress theme and paste the following code in it:
Learn how I made $33,543 online in the past 12 months.
Simply input your best email below to get started.
// Make theme available for translation // Translations can be filed in the /languages/ directory load_theme_textdomain( 'your-theme', TEMPLATEPATH . '/languages' ); $locale = get_locale(); $locale_file = TEMPLATEPATH . "/languages/$locale.php"; if ( is_readable($locale_file) ) require_once($locale_file);
Your theme is now ready to be translated!