diff --git a/lib/SimpleSAML/XHTML/Template.php b/lib/SimpleSAML/XHTML/Template.php
index e19b52bdee3d512c30a4e64de9ef5c1c8cf3c28c..7c5c7a28150eb57bf8c23a9d9e08b423f2dc552d 100644
--- a/lib/SimpleSAML/XHTML/Template.php
+++ b/lib/SimpleSAML/XHTML/Template.php
@@ -273,8 +273,13 @@ class SimpleSAML_XHTML_Template {
 	 * @param $tag         The tag that has a translation
 	 * @param $translation The translation array
 	 */
-	public function includeInlineTranslation($tag, array $translation) {
+	public function includeInlineTranslation($tag, $translation) {
 		
+		if (is_string($translaton)) {
+			$translation = array($selected_language => $translated);
+		} elseif (!is_array($translaton)) {
+			throw new Exception("Inline translation should be string or array. Is " . gettype($translation) . " now!");
+		}
 		if (!is_array($this->langtext)) 
 			$this->langtext = array();