How to make the_tags title translatable?

How can I make the text in the_tags function translatable? Currently I’m using following:

<?php the_tags('<div class="tags">Post Tags',' ','</div>'); ?>  

But I’d like to make ‘Post Tags’ text translatable by adding the text domain, similar to this:

_e('Post Tags', 'textdomain');

Related posts

1 comment

  1. Translate the title before you send it to the_tags():

    the_tags(
        '<div class="tags">' . __( 'Post Tags', 'textdomain' ),
        ' ',
        '</div>'
    );
    

Comments are closed.