icl_register_string

The Polylang icl register string function.

Description

icl_register_string( $context, (string) $name, $string, (constant) $allow_empty_value = false, (string) $source_lang = '' ); 

Parameters (5)

0. $context
The context.
1. $name (string)
The name.
2. $string
The string.
3. $allow_empty_value — Optional. (constant) => false
The allow empty value.
4. $source_lang — Optional. (string) => ''
The source lang.

Usage

  1. if ( !function_exists( 'icl_register_string' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'polylang/modules/wpml/wpml-legacy-api.php'; 
  3.  
  4. // The context. 
  5. $context = null; 
  6.  
  7. // The name. 
  8. $name = ''; 
  9.  
  10. // The string. 
  11. $string = null; 
  12.  
  13. // The allow empty value. 
  14. $allow_empty_value = false; 
  15.  
  16. // The source lang. 
  17. $source_lang = ''; 
  18.  
  19. // NOTICE! Understand what this does before running. 
  20. $result = icl_register_string($context, $name, $string, $allow_empty_value, $source_lang); 
  21.  

Defined (1)

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

/modules/wpml/wpml-legacy-api.php  
  1. function icl_register_string( $context, $name, $string, $allow_empty_value = false, $source_lang = '' ) { 
  2. PLL_WPML_Compat::instance()->register_string( $context, $name, $string );