1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-08-13 16:54:00 -04:00

Add lang attribute in html tag

This commit is contained in:
NumEricR 2013-08-26 22:25:03 +02:00
parent 10ab20d8e2
commit 1b2abab6dd
3 changed files with 7 additions and 0 deletions

View File

@ -248,4 +248,9 @@ class Tools
fclose($fp);
}
}
public static function getDocLanguage($userlanguage) {
$lang = explode('.', $userlanguage);
return str_replace('_', '-', $lang[0]);
}
}

View File

@ -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(),

View File

@ -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">