code/libraries/joomlatools/library/translator/abstract.php
public function translate($string, array $parameters = array())
    {
        $translation = '';

        if(!empty($string))
        {
            $catalogue   = $this->getCatalogue();
            $translation = $catalogue->has($string) ? $catalogue->get($string) : $string;

            if (count($parameters)) {
                $translation = $this->_replaceParameters($translation, $parameters);
            }
        }

        return $translation;
    }
public function translate($string, array $parameters = array())
    {
        $translation = '';

        if(!empty($string))
        {
            $catalogue   = $this->getCatalogue();
            $translation = $catalogue->has($string) ? $catalogue->get($string) : $string;

            if (count($parameters)) {
                $translation = $this->_replaceParameters($translation, $parameters);
            }
        }

        return $translation;
    }
public function translate ( $ string , array $ parameters = array ( ) ) { $ translation = '' ; if ( ! empty ( $ string ) ) { $ catalogue = $ this -> getCatalogue ( ) ; $ translation = $ catalogue -> has ( $ string ) ? $ catalogue -> get ( $ string ) : $ string ; if ( count ( $ parameters ) ) { $ translation = $ this -> _replaceParameters ( $ translation , $ parameters ) ; } } return $ translation ; }
Translates a string and handles parameter replacements

Parameters are wrapped in curly braces. So {foo} would be replaced with bar given that $parameters['foo'] = 'bar'

@param string $string String to translate
@param array  $parameters An array of parameters
@return string Translated string
Translates a string and handles parameter replacements