@VirtualProperty
@SerializedName("totalRecurringTaxesFormatted")

@param null|string $locale

@throws PriceFormatterException

@return float
170301
public function getTotalRecurringTaxesFormatted($locale = null)
    {
        return $this->priceFormatter->format((float)$this->getTotalRecurringTaxes(), null, $locale);
    }
298439
public static function formatMoney($number, $locale = null, $internationalFormat = false, $format = true)
    {
        // When prices in cents needs to be formatted, divide by 100 to allow formatting in whole units
        if (config('laracart.prices_in_cents', false) === true && $format) {
            $number = $number / 100;
        // When prices in cents do not need to be formatted then cast to integer and round the price
        } elseif (config('laracart.prices_in_cents', false) === true && !$format) {
            $number = (int) round($number);
        } else {
            $number = number_format($number, 2, '.', '');
        }

        if ($format) {
            setlocale(LC_MONETARY, null);
            setlocale(LC_MONETARY, empty($locale) ? config('laracart.locale', 'en_US.UTF-8') : $locale);

            if (empty($internationalFormat) === true) {
                $internationalFormat = config('laracart.international_format', false);
            }

            $number = money_format($internationalFormat ? '%i' : '%n', $number);
        }

        return $number;
    }
975322
protected function getNumberFormat($locale)
    {
        if (!isset($this->numberFormats[$locale])) {
            $this->numberFormats[$locale] = $this->numberFormatRepository->get($locale);
        }

        return $this->numberFormats[$locale];
    }
495887
public function getUnitPriceFormatted($locale = null)
    {
        $formatter = $this->getFormatter($locale);

        return $formatter->format((float)$this->getUnitPrice());
    }
87377
public static String toCurrency(Locale locale, double number) {
        return NumberFormat.getCurrencyInstance(locale).format(number);
    }
271386
public function localizeMoneyFilter(Money $money, string $locale = null): string
    {
        $formatter      = twig_get_number_formatter($locale, 'currency');
        $moneyFormatter = new IntlMoneyFormatter($formatter, $this->currencies);

        /** @var \Money\Money $formattingMoney */
        $formattingMoney = $money->getValueObject();

        return $moneyFormatter->format($formattingMoney);
    }
250118
protected function getFormatter($locale) {
		if (! isset($this->formatters[$locale])) {
			$this->formatters[$locale] = new NumberFormatter($locale, NumberFormatter::CURRENCY);
		}
		
		return $this->formatters[$locale];
	}
839447
public function getPrice($format = self::EURO)
    {
        $this->validatePriceFormat($format);

        if ($this->price !== null && $format == self::EURO) {
            return round($this->price / 100, 2);
        }

        return $this->price;
    }
53234
public function findUsagesByLocales( $locale = null )
    {
        if ( empty( $locale ) )
        {
            $locale = $this->getLocale();
        }

        return $this->getMapper()
                    ->findUsagesByLocales( (array) $locale );
    }
996340
public function getNetShippingCostsFormatted($locale = null)
    {
        return $this->priceFormatter->format((float)$this->entity->getNetShippingCosts(), null, $locale);
    }
1050626
public static function getDateTimeFormat($locale = null)
    {
        $format = Zend_Locale_Data::getContent($locale, 'datetime');
        if (empty($format)) {

            throw new Zend_Locale_Exception("failed to receive data from locale $locale");
        }
        return $format;
    }
1295467
private function setLocale($locale)
    {
        if($locale != null)
        {
            \Locale::setDefault($locale);
        }
        else 
        {
           \Locale::setDefault(self::CURRENCY_DEFAULT_LOCALE); 
        }
        
        $this->locale = \Locale::getDefault();
    }
1228642
public function transformToCurrency($amount, $locale, $currency)
    {
        $localeClassName = $this->resolveLocaleClassName($locale);
        $transformer = new $localeClassName($this->options);

        $decimalPart = (int) ($amount / 100);
        $fractionalPart = $amount % 100;

        if (0 === $fractionalPart) {
            return trim($transformer->toCurrencyWords($currency, $decimalPart));
        }

        return trim($transformer->toCurrencyWords($currency, $decimalPart, $fractionalPart));
    }
1322789
protected function getFormFieldName($locale = null)
    {
        if ( ! $locale) {
            return $this->field->key();
        }

        return $this->field->key() . '[' . $locale . ']';
    }
718288
public function setLocale($locale)
    {
        $this->parentSetLocale($locale);
        $this->formatCache = [];
        $this->dateFormatCache = [];
        return $this;
    }
647020
public function format(
        $price,
        $digits = null,
        $locale = null,
        $currency = null,
        $currencyPosition = self::CURRENCY_LOCATION_NONE
    ) {
        if (is_null($locale)) {
            $locale = $this->defaultLocale;
        }

        if (is_null($digits)) {
            $digits = $this->defaultDigits;
        }

        $formatter = $this->getFormatter($locale, $digits);
        $formattedPrice = $formatter->format($price);

        if ($currencyPosition != self::CURRENCY_LOCATION_NONE && is_null($currency)) {
            throw new PriceFormatterException('currency must be set, if location is set');
        }

        switch ($currencyPosition) {
            case self::CURRENCY_LOCATION_PREFIX:
                $formattedPrice = $currency . ' ' . $formattedPrice;
                break;
            case self::CURRENCY_LOCATION_SUFFIX:
                $formattedPrice = $formattedPrice . ' ' . $currency;
                break;
        }

        return $formattedPrice;
    }
129335
protected function getFormatterDay($locale) {
		if (! isset($this->formattersDay[$locale])) {
			$this->formattersDay[$locale] = new IntlDateFormatter($locale, IntlDateFormatter::MEDIUM, IntlDateFormatter::NONE);
		}
		
		return $this->formattersDay[$locale];
	}