Skip to content
Snippets Groups Projects
Commit a506285b authored by Mads Freek Petersen's avatar Mads Freek Petersen
Browse files

Added some backward compatibility to includeInlineTranslation: now it accepts...

Added some backward compatibility to includeInlineTranslation: now it accepts a string as well as an array.


git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@538 44740490-163a-0410-bde0-09ae8108e29a
parent 8efb1c98
No related branches found
No related tags found
No related merge requests found
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment