diff --git a/lib/SimpleSAML/XHTML/Template.php b/lib/SimpleSAML/XHTML/Template.php index b0460e5bea3d0baa048ac79a58542e0a30c91833..0031701c7ad469ce65bd6034a7ff065a8d42b17e 100644 --- a/lib/SimpleSAML/XHTML/Template.php +++ b/lib/SimpleSAML/XHTML/Template.php @@ -163,13 +163,7 @@ class SimpleSAML_XHTML_Template { return $bestLanguage; } - /** - * Returns the language base (from configuration) - */ - private function getBaseLanguage() { - return 'en'; - } - + /** * Returns the language default (from configuration) */ @@ -293,10 +287,9 @@ class SimpleSAML_XHTML_Template { return $translations[$default_language]; } - /* Look up translation of tag in the base language. */ - $base_language = $this->getBaseLanguage(); - if(array_key_exists($base_language, $translations)) { - return $translations[$base_language]; + /* Check for english translation. */ + if(array_key_exists('en', $translations)) { + return $translations['en']; } /* Pick the first translation available. */ @@ -399,7 +392,7 @@ class SimpleSAML_XHTML_Template { public function includeInlineTranslation($tag, $translation) { if (is_string($translation)) { - $translation = array($this->getBaseLanguage() => $translation); + $translation = array('en' => $translation); } elseif (!is_array($translation)) { throw new Exception("Inline translation should be string or array. Is " . gettype($translation) . " now!"); }