public function lang($name, $vars = [], $template = self::USE_NOT_TPL) {
        $request = Request::instance();
        $config = $this->resolve(RESOLVE_LANG, $name);
        $name = $config[1];
        $config = $config[0];

        if (isset($config[$request->lang][$name])) {
            if ($template == self::USE_NOT_TPL) {
                if (count($vars) == 0) {
                    return $config[$request->lang][$name];
                }
                else {
                    $content = $config[$request->lang][$name];

                    foreach ($vars as $key => $value) {
                        $content = preg_replace('#\{' . $key . '\}#isU', $value, $content);
                    }

                    return $content;
                }
            }
            else {
                $tpl = new Template($config[$request->lang][$name], $name, 0, Template::TPL_STRING);
                $tpl->assign($vars);

                return $tpl->show(Template::TPL_COMPILE_TO_STRING, Template::TPL_COMPILE_LANG);
            }
        }
        else {
            $this->addError('sentence ' . $name . '/' . $request->lang . ' not found', __FILE__, __LINE__, ERROR_WARNING);

            return 'sentence not found (' . $name . ',' . $request->lang . ')';
        }
    }