public function __construct() {
        parent::__construct();

        $this->numberFormatter = new NumberFormatter(Environment::getInstance()->getLocale(), $this->getNumberStyle());

        $this->decimalSeparatorSymbol = StringHelper::trim($this->numberFormatter->getSymbol(NumberFormatter::DECIMAL_SEPARATOR_SYMBOL));
        if ($this->decimalSeparatorSymbol === FALSE) {
            throw new IllegalStateException(t('Cannot detect OS decimal separator symbol'));
        }
    }
Пример #2
0
 public function __construct()
 {
     parent::__construct();
     $this->numberFormatter = new NumberFormatter(Environment::getInstance()->getLocale(), $this->getNumberStyle());
     $this->decimalSeparator = Environment::getInstance()->getNumericFormattingElement('decimal_point');
 }