add support for multiple languages

This commit is contained in:
oliver 2015-04-26 11:15:38 +02:00
commit 3fdb23374c
4 changed files with 126 additions and 35 deletions

View file

@ -83,19 +83,22 @@
// Create date and time and number formatter
$this->set('dateFormatter', new \IntlDateFormatter(
\nre\core\Config::getDefault('locale'),
//\nre\core\Config::getDefault('locale'),
\Locale::getDefault(),
\IntlDateFormatter::MEDIUM,
\IntlDateFormatter::NONE,
NULL
));
$this->set('timeFormatter', new \IntlDateFormatter(
\nre\core\Config::getDefault('locale'),
//\nre\core\Config::getDefault('locale'),
\Locale::getDefault(),
\IntlDateFormatter::NONE,
\IntlDateFormatter::SHORT,
NULL
));
$this->set('numberFormatter', new \NumberFormatter(
\nre\core\Config::getDefault('locale'),
//\nre\core\Config::getDefault('locale'),
\Locale::getDefault(),
\NumberFormatter::DEFAULT_STYLE
));
}