public static function niceTitle($name)
    {
        if (empty($name)) {
            return '';
        }

        $gateway = null;

        try {
            $factory = new GatewayFactory();
            $gateway = $factory->create($name);
        } catch (\Exception $e) {
            /** do nothing */
        }

        $title = _t(
            'Gateway.' . $name,
            $gateway ? $gateway->getName() : $name
        );

        return ($title) ? $title : $gateway->getName();
    }