public static function __($key, array $params = [], $domain = 'messages', $locale = null)
    {
        // If $key is an array, convert it to a sanitized string
        if (is_array($key)) {
            array_walk(
                $key,
                function (&$value) {
                    $value = preg_replace('/[^a-z-]/', '', strtolower($value));
                }
            );
            $key = implode('.', $key);
        }

        return self::trans($key, self::htmlencodeParams($params), $domain, $locale);
    }
public static function __($key, array $params = [], $domain = 'messages', $locale = null)
    {
        // If $key is an array, convert it to a sanitized string
        if (is_array($key)) {
            array_walk(
                $key,
                function (&$value) {
                    $value = preg_replace('/[^a-z-]/', '', strtolower($value));
                }
            );
            $key = implode('.', $key);
        }

        return self::trans($key, self::htmlencodeParams($params), $domain, $locale);
    }
public static function __ ( $ key , array $ params = [ ] , $ domain = 'messages' , $ locale = null ) { // If $key is an array, convert it to a sanitized string if ( is_array ( $ key ) ) { array_walk ( $ key , function ( & $ value ) { $ value = preg_replace ( '/[^a-z-]/' , '' , strtolower ( $ value ) ) ; } ) ; $ key = implode ( '.' , $ key ) ; } return self :: trans ( $ key , self :: htmlencodeParams ( $ params ) , $ domain , $ locale ) ; }
Translation shortcut placeholder.

Special parameter keys:
'DEFAULT': the value is returns instead of the key of no translation is found
'NUMBER': transChoice is triggered with the value as count value

@param mixed  $key    The message ID. If an array is passed, a sanitized key is built
@param array  $params Parameter for string replacement and commands ('DEFAULT', 'NUMBER')
@param string $domain
@param mixed  $locale

@return string
Translation shortcut placeholder .