public function translate(string $text, array $params = null)
    {
        $index = null;
        $namespace = 'Apps\Controller\\' . env_name . '\\';
        foreach (@debug_backtrace() as $caller) {
            if (isset($caller['class']) && Str::startsWith($namespace, $caller['class'])) {
                $index = Str::sub((string)$caller['class'], Str::length($namespace));
            }
        }
        return $this->get($index, $text, $params);
    }
public function translate(string $text, array $params = null)
    {
        $index = null;
        $namespace = 'Apps\Controller\\' . env_name . '\\';
        foreach (@debug_backtrace() as $caller) {
            if (isset($caller['class']) && Str::startsWith($namespace, $caller['class'])) {
                $index = Str::sub((string)$caller['class'], Str::length($namespace));
            }
        }
        return $this->get($index, $text, $params);
    }
public function translate ( string $ text , array $ params = null ) { $ index = null ; $ namespace = 'Apps\Controller\\' . env_name . '\\' ; foreach ( @ debug_backtrace ( ) as $ caller ) { if ( isset ( $ caller [ 'class' ] ) && Str :: startsWith ( $ namespace , $ caller [ 'class' ] ) ) { $ index = Str :: sub ( ( string ) $ caller [ 'class' ] , Str :: length ( $ namespace ) ) ; } } return $ this -> get ( $ index , $ text , $ params ) ; }
Get internalization based on called controller
@param string $text
@param array $params
@return string
Get internalization based on called controller