Надеюсь, это поможет другим. Я закончил тем, что переключал язык в каждой точке:
<?php
global $sitepress;
$current_lang = $sitepress->get_current_language(); //save current language
$taxonomy = "categories";
$terms = get_terms( array(
'suppress_filters' => false,
'taxonomy' => $taxonomy,
'hide_empty' => false,
) );
if ($terms) {
foreach ($terms as $term ) { ?>
<p>
EN: <?php echo $english = apply_filters( 'wpml_object_id', $term->term_id,'categories',false,'en'); ?><br />
FR: <?php echo $french = apply_filters( 'wpml_object_id', $term->term_id,'categories',false,'fr'); ?><br />
DE: <?php echo $german = apply_filters( 'wpml_object_id', $term->term_id,'categories',false,'de'); ?><br />
IT: <?php echo $italian = apply_filters( 'wpml_object_id', $term->term_id,'categories',false,'it'); ?><br />
RU: <?php echo $russian = apply_filters( 'wpml_object_id', $term->term_id,'categories',false,'ru'); ?><br />
ES: <?php echo $spanish = apply_filters( 'wpml_object_id', $term->term_id,'categories',false,'es'); ?><br />
<?php $sitepress->switch_lang('en'); ?>
EN: <?php echo get_term(icl_object_id($french, 'categories', false, 'en'))->name; ?><br />
<?php $sitepress->switch_lang('fr'); ?>
FR: <?php echo get_term(icl_object_id($french, 'categories', false, 'fr'))->name; ?><br />
<?php $sitepress->switch_lang('de'); ?>
DE: <?php echo get_term(icl_object_id($french, 'categories', false, 'de'))->name; ?><br />
<?php $sitepress->switch_lang('it'); ?>
IT: <?php echo get_term(icl_object_id($french, 'categories', false, 'it'))->name; ?><br />
<?php $sitepress->switch_lang('ru'); ?>
RU: <?php echo get_term(icl_object_id($french, 'categories', false, 'ru'))->name; ?><br />
<?php $sitepress->switch_lang('es'); ?>
ES: <?php echo get_term(icl_object_id($french, 'categories', false, 'es'))->name; ?><br />
<?php $sitepress->switch_lang($current_lang); //restore previous language ?>
</p>
<hr />
<?php }
}
?>