_ex

Display translated string with gettext context.

Description

(string) _ex( (string) $text, (string) $context, (string) $domain = 'default' ); 

Returns (string)

Translated context string without pipe.

Parameters (3)

0. $text (string)
Text to translate.
1. $context (string)
Context information for the translators.
2. $domain — Optional. (string) => 'default'
Text domain. Unique identifier for retrieving translated strings. Default default..

Usage

  1. if ( !function_exists( '_ex' ) ) { 
  2. require_once ABSPATH . WPINC . '/l10n.php'; 
  3.  
  4. // Text to translate. 
  5. $text = ''; 
  6.  
  7. // Context information for the translators. 
  8. $context = ''; 
  9.  
  10. // Optional. Text domain. Unique identifier for retrieving translated strings. 
  11. // Default 'default'. 
  12. $domain = 'default'; 
  13.  
  14. // NOTICE! Understand what this does before running. 
  15. $result = _ex($text, $context, $domain); 
  16.  

Defined (1)

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

/wp-includes/l10n.php  
  1. function _ex( $text, $context, $domain = 'default' ) { 
  2. echo _x( $text, $context, $domain );