Skip to content
Snippets Groups Projects
Commit 010618d0 authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Fix

parent 887b7069
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
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