provide a localized number formatter
This commit is contained in:
parent
76875f1c69
commit
16e5f0c532
1 changed files with 5 additions and 1 deletions
|
|
@ -67,7 +67,7 @@
|
||||||
// Create linker
|
// Create linker
|
||||||
$this->linker = new \nre\core\Linker($this->request);
|
$this->linker = new \nre\core\Linker($this->request);
|
||||||
|
|
||||||
// Create date and time formatter
|
// Create date and time and number formatter
|
||||||
$this->set('dateFormatter', new \IntlDateFormatter(
|
$this->set('dateFormatter', new \IntlDateFormatter(
|
||||||
\nre\core\Config::getDefault('locale'),
|
\nre\core\Config::getDefault('locale'),
|
||||||
\IntlDateFormatter::MEDIUM,
|
\IntlDateFormatter::MEDIUM,
|
||||||
|
|
@ -80,6 +80,10 @@
|
||||||
\IntlDateFormatter::SHORT,
|
\IntlDateFormatter::SHORT,
|
||||||
NULL
|
NULL
|
||||||
));
|
));
|
||||||
|
$this->set('numberFormatter', new \NumberFormatter(
|
||||||
|
\nre\core\Config::getDefault('locale'),
|
||||||
|
\NumberFormatter::DEFAULT_STYLE
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue