Load Text Domain

With this function you take the first step towards making your theme available for translation.

Its best to call this function from within the after_setup_theme() action hook i.e. after the setup, registration, and initialization actions of your theme have run.

function butter_setup(){

  // This is where you would add support for theme features like
  // post formats, feed links, etc
  
  // ...
  
  // Make theme available for translation.
  load_theme_textdomain('butter', get_template_directory() . '/languages');
}
add_action('after_setup_theme', 'butter_setup');

Now add a directory named ‘languages’ in your theme directory.

This site uses cookies to offer you a better browsing experience. By browsing this website, you agree to our use of cookies.