is_textdomain_loaded

Whether there are translations for the text domain.

Description

is_textdomain_loaded( (string) $domain ); 

Parameters (1)

0. $domain (string)
Text domain. Unique identifier for retrieving translated strings.

Usage

  1. if ( !function_exists( 'is_textdomain_loaded' ) ) { 
  2. require_once ABSPATH . WPINC . '/l10n.php'; 
  3.  
  4. // Text domain. Unique identifier for retrieving translated strings. 
  5. $domain = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = is_textdomain_loaded($domain); 
  9.  

Defined (1)

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

/wp-includes/l10n.php  
  1. function is_textdomain_loaded( $domain ) { 
  2. global $l10n; 
  3. return isset( $l10n[ $domain ] );