Zepi/Core/Language/src/Manager/TranslationManager.php
public function translate($string, $namespace, $arguments = array())
    {
        // Load the language file for the given namespace if the language file isn't loaded
        if (!isset($this->translatedStrings[$namespace]) || !is_array($this->translatedStrings[$namespace])) {
            $this->loadLanguageFileForNamespace($namespace);
        }
        
        // If no translation for the original string is available or the string is not translated 
        // return the original string to the caller.
        if (!isset($this->translatedStrings[$namespace][$string]) || $this->translatedStrings[$namespace][$string] == '') {
            return $this->replacePlaceholders($string, $arguments);
        }
        
        return $this->replacePlaceholders($this->translatedStrings[$namespace][$string], $arguments);
    }
public function translate($string, $namespace, $arguments = array())
    {
        // Load the language file for the given namespace if the language file isn't loaded
        if (!isset($this->translatedStrings[$namespace]) || !is_array($this->translatedStrings[$namespace])) {
            $this->loadLanguageFileForNamespace($namespace);
        }
        
        // If no translation for the original string is available or the string is not translated 
        // return the original string to the caller.
        if (!isset($this->translatedStrings[$namespace][$string]) || $this->translatedStrings[$namespace][$string] == '') {
            return $this->replacePlaceholders($string, $arguments);
        }
        
        return $this->replacePlaceholders($this->translatedStrings[$namespace][$string], $arguments);
    }
public function translate ( $ string , $ namespace , $ arguments = array ( ) ) { // Load the language file for the given namespace if the language file isn't loaded if ( ! isset ( $ this -> translatedStrings [ $ namespace ] ) || ! is_array ( $ this -> translatedStrings [ $ namespace ] ) ) { $ this -> loadLanguageFileForNamespace ( $ namespace ) ; } // If no translation for the original string is available or the string is not translated  // return the original string to the caller. if ( ! isset ( $ this -> translatedStrings [ $ namespace ] [ $ string ] ) || $ this -> translatedStrings [ $ namespace ] [ $ string ] == '' ) { return $ this -> replacePlaceholders ( $ string , $ arguments ) ; } return $ this -> replacePlaceholders ( $ this -> translatedStrings [ $ namespace ] [ $ string ] , $ arguments ) ; }
Returns the translated version of the given string. If no
translation is available, the function will return the given
string back.

@access public
@param string $string
@param string $namespace
@param array $arguments
@return string
Returns the translated version of the given string . If no translation is available the function will return the given string back .