protected function localizeNumber($number, NumberFormat $numberFormat)
    {
        // Localize digits.
        $numberingSystem = $numberFormat->getNumberingSystem();
        if (isset($this->digits[$numberingSystem])) {
            $number = strtr($number, $this->digits[$numberingSystem]);
        }
        // Localize symbols.
        $replacements = [
            '.' => $numberFormat->getDecimalSeparator(),
            ',' => $numberFormat->getGroupingSeparator(),
            '+' => $numberFormat->getPlusSign(),
            '-' => $numberFormat->getMinusSign(),
            '%' => $numberFormat->getPercentSign(),
        ];
        $number = strtr($number, $replacements);

        return $number;
    }