From: Nik Okuntseff Date: Tue, 5 Apr 2016 13:23:53 +0000 (+0000) Subject: Improved detection of browser language. X-Git-Tag: timetracker_1.19-1~1730 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/commitdiff_plain/d20e3ae3a4685a3da6bb1da102a3010683a6d2da Improved detection of browser language. Improved efficiency by not going through file system again. --- diff --git a/WEB-INF/lib/I18n.class.php b/WEB-INF/lib/I18n.class.php index b69cd4fb..57fc1c47 100644 --- a/WEB-INF/lib/I18n.class.php +++ b/WEB-INF/lib/I18n.class.php @@ -139,7 +139,7 @@ class I18n { } $lang_parts = explode('-', trim($lang_pref_parts[0])); $lang_main = $lang_parts[0]; - if ($this->hasLang($lang_main)) { + if ($lang_main != $lang_pref_parts[0] && $this->hasLang($lang_main)) { return $lang_main; // Return main language designation, such as pt. } } diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 83cb9e25..38ddceaf 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.9.24.3486 | Copyright © Anuko | +  Anuko Time Tracker 1.9.24.3487 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve}