From 3a602c026bc93f46c3b58e50cc5900c431400415 Mon Sep 17 00:00:00 2001 From: Manuel Hiebel Date: Wed, 9 Apr 2014 15:20:32 +0000 Subject: workaround nav bar lang --- html/index.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/html/index.php b/html/index.php index 0450a94..89125a1 100644 --- a/html/index.php +++ b/html/index.php @@ -27,9 +27,10 @@ $url = isset($_GET['u']) ? trim($_GET['u']) : null; /** html[lang] of the doc. */ $lang = isset($_GET['l']) ? trim($_GET['l']) : null; if ($lang == 'undefined' || - $lang == '') { - - $lang = 'en'; + $lang == '' || + $lang == 'en') { +$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); +// $lang = 'en'; } /** body[class] of the doc. */ @@ -49,6 +50,6 @@ header('Access-Control-Allow-Methods: GET'); header('Content-Type: text/html;charset=utf-8'); header(sprintf('Expires: %s', gmdate('r', strtotime('+1 day')))); -echo _mgnav_html($wrap, $lang, null, $www_host, NCache::build($cache_path)); +echo _mgnav_html($wrap, $lang, null, '//1-mageia.rhcloud.com/', NCache::build($cache_path)); -apache_note('navMakeTime', number_format(microtime() - $t0, 6)); \ No newline at end of file +apache_note('navMakeTime', number_format(microtime() - $t0, 6)); -- cgit v1.2.1