Consistent html lang attribute
This commit is contained in:
parent
586385c3fe
commit
deab83f737
3 changed files with 10 additions and 2 deletions
|
@ -102,4 +102,12 @@ class Lang
|
|||
|
||||
return $key;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getLang(): string
|
||||
{
|
||||
return $this->lang;
|
||||
}
|
||||
}
|
|
@ -82,7 +82,7 @@ $container['view'] = function ($container) use (&$config) {
|
|||
$view->getEnvironment()->addGlobal('request', $container->get('request'));
|
||||
$view->getEnvironment()->addGlobal('alerts', Session::getAlert());
|
||||
$view->getEnvironment()->addGlobal('session', Session::all());
|
||||
$view->getEnvironment()->addGlobal('lang', $container->get('lang'));
|
||||
$view->getEnvironment()->addGlobal('current_lang', $container->get('lang')->getLang());
|
||||
$view->getEnvironment()->addGlobal('PLATFORM_VERSION', PLATFORM_VERSION);
|
||||
|
||||
$view->getEnvironment()->addFunction(new Twig_Function('route', 'route'));
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="{{ current_lang }}">
|
||||
<head>
|
||||
<title>{% block title %}Default{% endblock %} | {{ config.app_name }}</title>
|
||||
<meta charset="utf-8">
|
||||
|
|
Loading…
Reference in a new issue