mirror of
https://github.com/wallabag/wallabag.git
synced 2024-12-24 00:20:28 +00:00
Add lang attribute in html tag
This commit is contained in:
parent
10ab20d8e2
commit
1b2abab6dd
3 changed files with 7 additions and 0 deletions
|
@ -248,4 +248,9 @@ class Tools
|
|||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
public static function getDocLanguage($userlanguage) {
|
||||
$lang = explode('.', $userlanguage);
|
||||
return str_replace('_', '-', $lang[0]);
|
||||
}
|
||||
}
|
|
@ -50,6 +50,7 @@ elseif (isset($_GET['plainurl']) && !empty($_GET['plainurl'])) {
|
|||
|
||||
# vars to send to templates
|
||||
$tpl_vars = array(
|
||||
'lang' => Tools::getDocLanguage($poche->user->getConfigValue('language')),
|
||||
'referer' => $referer,
|
||||
'view' => $view,
|
||||
'poche_url' => Tools::getPocheUrl(),
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<!--[if IE 8]><html class="no-js ie8 ie678" lang="en"><![endif]-->
|
||||
<!--[if gt IE 8]><html class="no-js" lang="en"><![endif]-->
|
||||
<html>
|
||||
<html lang="{{ lang }}">
|
||||
<head>
|
||||
<meta name="viewport" content="initial-scale=1.0">
|
||||
<meta charset="utf-8">
|
||||
|
|
Loading…
Reference in a new issue