pll__

Translates a string ( previously registered with pll_register_string ).

Description

(string) pll__( (string) $string ); 

Returns (string)

the string translation in the current language

Parameters (1)

0. $string (string)
The string to translate

Usage

  1. if ( !function_exists( 'pll__' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'polylang/include/api.php'; 
  3.  
  4. // the string to translate 
  5. $string = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = pll__($string); 
  9.  

Defined (2)

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

/include/api.php  
  1. function pll__( $string ) { 
  2. return is_scalar( $string ) ? __( $string, 'pll_string' ) : $string; 
  1. function PLL() { 
  2. return $GLOBALS[polylang];