aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-09-15 10:12:56 -0700
committerNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-09-15 10:12:56 -0700
commitd62dfd88d2519f84b418700bcf7e08f1a4081662 (patch)
treedd6196df1919c616294a274652cc7f006893d594
parent48207b6814eeaef30a0baf64c3ed1e1d148de6fe (diff)
parentd081f272b0b63cdf86ab7666747b63dbff7f068e (diff)
downloadwallabag-d62dfd88d2519f84b418700bcf7e08f1a4081662.tar.gz
wallabag-d62dfd88d2519f84b418700bcf7e08f1a4081662.tar.zst
wallabag-d62dfd88d2519f84b418700bcf7e08f1a4081662.zip
Merge pull request #221 from NumEricR/language
Fix #183: language declaration
-rw-r--r--inc/poche/Tools.class.php5
-rw-r--r--index.php1
-rw-r--r--install/update.php2
-rw-r--r--install/update_to_1beta3.php2
-rw-r--r--tpl/layout.twig10
5 files changed, 13 insertions, 7 deletions
diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php
index 3a792d43..1ab90be1 100644
--- a/inc/poche/Tools.class.php
+++ b/inc/poche/Tools.class.php
@@ -248,4 +248,9 @@ class Tools
248 fclose($fp); 248 fclose($fp);
249 } 249 }
250 } 250 }
251
252 public static function getDocLanguage($userlanguage) {
253 $lang = explode('.', $userlanguage);
254 return str_replace('_', '-', $lang[0]);
255 }
251} \ No newline at end of file 256} \ No newline at end of file
diff --git a/index.php b/index.php
index 7b775c41..52a400a8 100644
--- a/index.php
+++ b/index.php
@@ -50,6 +50,7 @@ elseif (isset($_GET['plainurl']) && !empty($_GET['plainurl'])) {
50 50
51# vars to send to templates 51# vars to send to templates
52$tpl_vars = array( 52$tpl_vars = array(
53 'lang' => Tools::getDocLanguage($poche->user->getConfigValue('language')),
53 'referer' => $referer, 54 'referer' => $referer,
54 'view' => $view, 55 'view' => $view,
55 'poche_url' => Tools::getPocheUrl(), 56 'poche_url' => Tools::getPocheUrl(),
diff --git a/install/update.php b/install/update.php
index 1deaf7f3..9548d334 100644
--- a/install/update.php
+++ b/install/update.php
@@ -10,7 +10,7 @@ $store = new Database();
10<!--[if lte IE 7]> <html class="no-js ie7 ie67 ie678" lang="en"> <![endif]--> 10<!--[if lte IE 7]> <html class="no-js ie7 ie67 ie678" lang="en"> <![endif]-->
11<!--[if IE 8]> <html class="no-js ie8 ie678" lang="en"> <![endif]--> 11<!--[if IE 8]> <html class="no-js ie8 ie678" lang="en"> <![endif]-->
12<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> 12<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
13<html> 13<html lang="en">
14 <head> 14 <head>
15 <meta charset="utf-8"> 15 <meta charset="utf-8">
16 <title>updating poche</title> 16 <title>updating poche</title>
diff --git a/install/update_to_1beta3.php b/install/update_to_1beta3.php
index 8c93af6d..e0da1590 100644
--- a/install/update_to_1beta3.php
+++ b/install/update_to_1beta3.php
@@ -10,7 +10,7 @@ $old_salt = '464v54gLLw928uz4zUBqkRJeiPY68zCX';
10<!--[if lte IE 7]> <html class="no-js ie7 ie67 ie678" lang="en"> <![endif]--> 10<!--[if lte IE 7]> <html class="no-js ie7 ie67 ie678" lang="en"> <![endif]-->
11<!--[if IE 8]> <html class="no-js ie8 ie678" lang="en"> <![endif]--> 11<!--[if IE 8]> <html class="no-js ie8 ie678" lang="en"> <![endif]-->
12<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> 12<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
13<html> 13<html lang="en">
14 <head> 14 <head>
15 <meta charset="utf-8"> 15 <meta charset="utf-8">
16 <title>updating poche</title> 16 <title>updating poche</title>
diff --git a/tpl/layout.twig b/tpl/layout.twig
index 07ca231c..fec7054a 100644
--- a/tpl/layout.twig
+++ b/tpl/layout.twig
@@ -1,9 +1,9 @@
1<!DOCTYPE html> 1<!DOCTYPE html>
2<!--[if lte IE 6]><html class="no-js ie6 ie67 ie678" lang="en"><![endif]--> 2<!--[if lte IE 6]><html class="no-js ie6 ie67 ie678" lang="{{ lang }}"><![endif]-->
3<!--[if lte IE 7]><html class="no-js ie7 ie67 ie678" lang="en"><![endif]--> 3<!--[if lte IE 7]><html class="no-js ie7 ie67 ie678" lang="{{ lang }}"><![endif]-->
4<!--[if IE 8]><html class="no-js ie8 ie678" lang="en"><![endif]--> 4<!--[if IE 8]><html class="no-js ie8 ie678" lang="{{ lang }}"><![endif]-->
5<!--[if gt IE 8]><html class="no-js" lang="en"><![endif]--> 5<!--[if gt IE 8]><html class="no-js" lang="{{ lang }}"><![endif]-->
6<html> 6<html lang="{{ lang }}">
7 <head> 7 <head>
8 <meta name="viewport" content="initial-scale=1.0"> 8 <meta name="viewport" content="initial-scale=1.0">
9 <meta charset="utf-8"> 9 <meta charset="utf-8">