CommerceGuys\Intl\Formatter\NumberFormatter::replaceSymbols PHP Method

replaceSymbols() protected method

Replaces number symbols with their localized equivalents.
See also: http://cldr.unicode.org/translation/number-symbols
protected replaceSymbols ( string $value ) : string
$value string The value being formatted.
return string
    protected function replaceSymbols($value)
    {
        $replacements = ['.' => $this->numberFormat->getDecimalSeparator(), ',' => $this->numberFormat->getGroupingSeparator(), '+' => $this->numberFormat->getPlusSign(), '-' => $this->numberFormat->getMinusSign(), '%' => $this->numberFormat->getPercentSign()];
        return strtr($value, $replacements);
    }