diff --git a/src/I18n/Formatter/IcuFormatter.php b/src/I18n/Formatter/IcuFormatter.php index 1338849be98..febbaee37ad 100644 --- a/src/I18n/Formatter/IcuFormatter.php +++ b/src/I18n/Formatter/IcuFormatter.php @@ -72,7 +72,13 @@ public function format($locale, $message, array $vars) { * variables is found */ protected function _formatMessage($locale, $message, $vars) { - $formatter = new MessageFormatter($locale, $message); + if (!isset($this->_formatters[$locale])) { + $this->_formatters[$locale] = new MessageFormatter($locale, $message); + } else { + $this->_formatters[$locale]->setPattern($message); + } + + $formatter = $this->_formatters[$locale]; if (!$formatter) { throw new Exception\CannotInstantiateFormatter(