How to show term child only if has a post

AS per my knowledge you need to write following function in your functions.php and check whether the term has post using the below function

function check_term_posts($tax_slug, $term_id) {
    $args = array(
        'post_type' => 'post',
        'status' => 'publish',
        'tax_query' => array(
            array(
                'taxonomy' => spanishcategory,
                'field' => 'term_id',
                'terms' => 169
            )
        )
    );
    $term_query =  new WP_Query($args);
    $term_posts_count = $term_query->found_posts;
    if( $term_posts_count>0 ){
        return true;// You can code here to echo name of category
    } else {
        return false;
    }
}

Do let me know if this can solve your error or need any help?