1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-11-27 11:22:17 -05: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); 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 # vars to send to templates
$tpl_vars = array( $tpl_vars = array(
'lang' => Tools::getDocLanguage($poche->user->getConfigValue('language')),
'referer' => $referer, 'referer' => $referer,
'view' => $view, 'view' => $view,
'poche_url' => Tools::getPocheUrl(), 'poche_url' => Tools::getPocheUrl(),

View File

@ -4,6 +4,7 @@
<!--[if IE 8]><html class="no-js ie8 ie678" lang="en"><![endif]--> <!--[if IE 8]><html class="no-js ie8 ie678" lang="en"><![endif]-->
<!--[if gt IE 8]><html class="no-js" lang="en"><![endif]--> <!--[if gt IE 8]><html class="no-js" lang="en"><![endif]-->
<html> <html>
<html lang="{{ lang }}">
<head> <head>
<meta name="viewport" content="initial-scale=1.0"> <meta name="viewport" content="initial-scale=1.0">
<meta charset="utf-8"> <meta charset="utf-8">