diff --git a/lib/SimpleSAML/Locale/Translate.php b/lib/SimpleSAML/Locale/Translate.php index 375c458b847e9e504e898d9af652fe9fed8d2243..1982c6b45ec4fe79c307feb0e8110cc5f3f3951f 100644 --- a/lib/SimpleSAML/Locale/Translate.php +++ b/lib/SimpleSAML/Locale/Translate.php @@ -81,7 +81,8 @@ class Translate // This may happen if you forget to set a variable and then run undefinedVar through the trans-filter $original = $original ?? 'undefined variable'; - $text = Translator::$current->gettext($original); + $loc = new Localization(Configuration::getInstance()); + $text = $loc->getTranslator()->gettext($original); if (func_num_args() === 1) { return $text; @@ -107,7 +108,8 @@ class Translate // This may happen if you forget to set a variable and then run undefinedVar through the trans-filter $original = $original ?? 'undefined variable'; - $text = Translator::$current->ngettext($original, $plural, $value); + $loc = new Localization(Configuration::getInstance()); + $text = $loc->getTranslator()->ngettext($original, $plural, $value); if (func_num_args() === 3) { return $text;