public function message($key, array $vars = array()) {
        if (!$this->_messages) {
            $this->_loadMessages();
        }

        $locale = $this->getConfig('locale');

        if (empty($this->_messages[$locale])) {
            throw new MissingLocaleException(sprintf('Localized messages for %s do not exist', $locale));
        }

        $string = isset($this->_messages[$locale][$key]) ? $this->_messages[$locale][$key] : '';

        if ($string && $vars) {
            foreach ($vars as $key => $value) {
                $string = str_replace('{' . $key . '}', $value, $string);
            }
        }

        return $string;
    }