public static function translate($text)
    {
        $args = func_get_args();
        unset($args[0]);
        
        if (isset(self::$messages[$text])) {
            $text = self::$messages[$text];
        }
        
        return vsprintf($text, $args);
    }
public static function translate($text)
    {
        $args = func_get_args();
        unset($args[0]);
        
        if (isset(self::$messages[$text])) {
            $text = self::$messages[$text];
        }
        
        return vsprintf($text, $args);
    }
public static function translate ( $ text ) { $ args = func_get_args ( ) ; unset ( $ args [ 0 ] ) ; if ( isset ( self :: $ messages [ $ text ] ) ) { $ text = self :: $ messages [ $ text ] ; } return vsprintf ( $ text , $ args ) ; }
Translate a text. Works the same way as sprintf.

@param string $text
@return string
Translate a text . Works the same way as sprintf .