Replace WordPress wp_list_categories “no categories”

By default, if you list WordPress subcategories and current category doesn’t have subcategories, it will say “no categories”.

You can change it from category-template.php on line 419, from

function wp_list_categories( $args = '' ) {
 $defaults = array('show_option_none' => __('No categories'));
}

to:

function wp_list_categories( $args = '' ) {
 $defaults = array('show_option_none' => 'What ever you want');
}

Hacking with WordPress core files is not the best idea. If you want to update to a new version, the changes will reverse.

Therefor it is better to add a filter to your themes functions.php file (located in your theme’s directory, if not, then create one)