public function formatCurrency($value, $currency)
    {
        if (self::DECIMAL == $this->style) {
            return $this->format($value);
        }

        $symbol = Currencies::getSymbol($currency, 'en');
        $fractionDigits = Currencies::getFractionDigits($currency);

        $value = $this->roundCurrency($value, $currency);

        $negative = false;
        if (0 > $value) {
            $negative = true;
            $value *= -1;
        }

        $value = $this->formatNumber($value, $fractionDigits);

        // There's a non-breaking space after the currency code (i.e. CRC 100), but not if the currency has a symbol (i.e. £100).
        $ret = $symbol.(mb_strlen($symbol, 'UTF-8') > 2 ? "\xc2\xa0" : '').$value;

        return $negative ? '-'.$ret : $ret;
    }