roundcubemail/program/lib/Roundcube/rcube.php
public function text_exists($name, $domain = null, &$ref_domain = null)
    {
        // load localization files if not done yet
        if (empty($this->texts)) {
            $this->load_language();
        }

        if (isset($this->texts[$name])) {
            $ref_domain = '';
            return true;
        }

        // any of loaded domains (plugins)
        if ($domain == '*') {
            foreach ($this->plugins->loaded_plugins() as $domain) {
                if (isset($this->texts[$domain.'.'.$name])) {
                    $ref_domain = $domain;
                    return true;
                }
            }
        }
        // specified domain
        else if ($domain) {
            $ref_domain = $domain;
            return isset($this->texts[$domain.'.'.$name]);
        }

        return false;
    }
public function text_exists($name, $domain = null, &$ref_domain = null)
    {
        // load localization files if not done yet
        if (empty($this->texts)) {
            $this->load_language();
        }

        if (isset($this->texts[$name])) {
            $ref_domain = '';
            return true;
        }

        // any of loaded domains (plugins)
        if ($domain == '*') {
            foreach ($this->plugins->loaded_plugins() as $domain) {
                if (isset($this->texts[$domain.'.'.$name])) {
                    $ref_domain = $domain;
                    return true;
                }
            }
        }
        // specified domain
        else if ($domain) {
            $ref_domain = $domain;
            return isset($this->texts[$domain.'.'.$name]);
        }

        return false;
    }
public function text_exists ( $ name , $ domain = null , & $ ref_domain = null ) { // load localization files if not done yet if ( empty ( $ this -> texts ) ) { $ this -> load_language ( ) ; } if ( isset ( $ this -> texts [ $ name ] ) ) { $ ref_domain = '' ; return true ; } // any of loaded domains (plugins) if ( $ domain == '*' ) { foreach ( $ this -> plugins -> loaded_plugins ( ) as $ domain ) { if ( isset ( $ this -> texts [ $ domain . '.' . $ name ] ) ) { $ ref_domain = $ domain ; return true ; } } } // specified domain else if ( $ domain ) { $ ref_domain = $ domain ; return isset ( $ this -> texts [ $ domain . '.' . $ name ] ) ; } return false ; }
Check if the given text label exists

@param string $name       Label name
@param string $domain     Label domain (plugin) name or '*' for all domains
@param string $ref_domain Sets domain name if label is found

@return boolean True if text exists (either in the current language or in en_US)
Check if the given text label exists