WordPress.org

Forums

get_the_term_list localization (3 posts)

  1. Piet Bos
    Member
    Posted 4 years ago #

    Just implemented a whole bunch of custom taxonomies for Pages and now I would like to show them on my multi-lingual website.

    The taxonomies show alright on the English version, but I cannot figure out how to localize the get_the_term_list string.

    For example:
    <?php echo get_the_term_list( $post->ID, 'size', 'Sizes: ', ', ', '' ); ?>

    The string 'Sizes: ' needs to be wrapped some way.

    Any solutions?

    Thanks in advance

  2. Safirul Alredha
    Member
    Posted 4 years ago #

    <?php echo get_the_term_list( $post->ID, 'size', __('Sizes: ', 'yourthemedomainhere'), ', ', '' ); ?>

  3. Piet Bos
    Member
    Posted 4 years ago #

    Thanks Zeo,
    That does the trick!

Topic Closed

This topic has been closed to new replies.

About this Topic