This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 1 reply, has 2 voices.

Last updated by Bruno Kos 1 year, 3 months ago.

Assigned support staff: Bruno Kos.

Author Posts
March 6, 2019 at 4:23 pm #3280314


I'm using the following code to output the ID's of all the related taxonomy terms. How can I output the taxonomy term names for each language instead? I thought I could just use


but that doesn't output anything. Where am I going wrong?

  $taxonomy = "categories";
  $terms = get_terms( array(
    'suppress_filters' => false,
    'taxonomy' => $taxonomy,
    'hide_empty' => false,
  ) );

  if  ($terms) {
    foreach ($terms  as $term ) { ?>
        EN: <?php echo $english = icl_object_id($term->term_id,'categories',false,'en'); ?><br />
        FR: <?php echo $french = icl_object_id($term->term_id,'categories',false,'fr'); ?><br />
        DE: <?php echo $german = icl_object_id($term->term_id,'categories',false,'de'); ?><br />
        IT: <?php echo $italian = icl_object_id($term->term_id,'categories',false,'it'); ?><br />
        RU: <?php echo $russian = icl_object_id($term->term_id,'categories',false,'ru'); ?><br />
        ES: <?php echo $spanish = icl_object_id($term->term_id,'categories',false,'es'); ?><br />
    <?php }
March 8, 2019 at 9:08 am #3290370

Bruno Kos

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)


Thank you for contacting WPML support!

Can you tell me if something like this would work for you?

Bruno Kos

The topic ‘[Closed] Get taxonomy term name of translation’ is closed to new replies.