1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-11-30 12:52:24 -05:00

Merge pull request #221 from NumEricR/language

Fix #183: language declaration
This commit is contained in:
Nicolas Lœuillet 2013-09-15 10:12:56 -07:00
commit d62dfd88d2
5 changed files with 13 additions and 7 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

@ -10,7 +10,7 @@ $store = new Database();
<!--[if lte IE 7]> <html class="no-js ie7 ie67 ie678" lang="en"> <![endif]--> <!--[if lte IE 7]> <html class="no-js ie7 ie67 ie678" lang="en"> <![endif]-->
<!--[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 lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>updating poche</title> <title>updating poche</title>

View File

@ -10,7 +10,7 @@ $old_salt = '464v54gLLw928uz4zUBqkRJeiPY68zCX';
<!--[if lte IE 7]> <html class="no-js ie7 ie67 ie678" lang="en"> <![endif]--> <!--[if lte IE 7]> <html class="no-js ie7 ie67 ie678" lang="en"> <![endif]-->
<!--[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 lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>updating poche</title> <title>updating poche</title>

View File

@ -1,9 +1,9 @@
<!DOCTYPE html> <!DOCTYPE html>
<!--[if lte IE 6]><html class="no-js ie6 ie67 ie678" lang="en"><![endif]--> <!--[if lte IE 6]><html class="no-js ie6 ie67 ie678" lang="{{ lang }}"><![endif]-->
<!--[if lte IE 7]><html class="no-js ie7 ie67 ie678" lang="en"><![endif]--> <!--[if lte IE 7]><html class="no-js ie7 ie67 ie678" lang="{{ lang }}"><![endif]-->
<!--[if IE 8]><html class="no-js ie8 ie678" lang="en"><![endif]--> <!--[if IE 8]><html class="no-js ie8 ie678" lang="{{ lang }}"><![endif]-->
<!--[if gt IE 8]><html class="no-js" lang="en"><![endif]--> <!--[if gt IE 8]><html class="no-js" lang="{{ lang }}"><![endif]-->
<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">