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);
    }