public function get($key, $params = null)
    {
        $msg = null;
        foreach ($this->messages[$this->currentLang] as $messages) {
            if (isset($messages[$key])) {
                $msg = $messages[$key];
            }
        }

        if ($msg === null) {
            throw new Exception("Error: don't find message '$key'");
        }

        if ($params !== null || (is_array($params) && count($params) > 0)) {
            $msg = call_user_func_array('sprintf', array_merge(array($msg), is_array($params) ? $params : array($params)));
        }

        return $msg;
    }