pll_get_term_translations

Returns an array of translations of a term.

Description

(array) pll_get_term_translations( (int) $term_id ); 

Returns (array)

an associative array of translations with language code as key and translation term_id as value

Parameters (1)

0. $term_id (int)
The term id.

Usage

  1. if ( !function_exists( 'pll_get_term_translations' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'polylang/include/api.php'; 
  3.  
  4. // The term id. 
  5. $term_id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = pll_get_term_translations($term_id); 
  9.  

Defined (1)

The function is defined in the following location(s).

/include/api.php  
  1. function pll_get_term_translations( $term_id ) { 
  2. return PLL()->model->term->get_translations( $term_id );