From a9e7cea54b26063d3fd9016d823c8e41049c56a0 Mon Sep 17 00:00:00 2001 From: "Janus B. Kristensen" Date: Sun, 25 Jan 2009 10:45:07 +0000 Subject: [PATCH] Fixes major bug in the translation system. The bug caused the default language to be ignored if set to "English" regardless of whether this was done through the browser or through a cookie. svn path=/trunk/boinc/; revision=17012 --- html/inc/translation.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/html/inc/translation.inc b/html/inc/translation.inc index 9b64a63495..deb91d2bcb 100644 --- a/html/inc/translation.inc +++ b/html/inc/translation.inc @@ -154,7 +154,10 @@ function tra($text /* ...arglist... */){ if (isset($language_lookup_array[$language][$text])) { $text = $language_lookup_array[$language][$text]; break; - } + } else if ($language=="en"){ + // This language is defined in the code and is always available + break; + } } // Replace relevant substrings with given arguments