Skip to content

Commit

Permalink
fix for 1a75eec
Browse files Browse the repository at this point in the history
(cherry picked from commit 2e29733)
  • Loading branch information
maxpozdeev committed Sep 14, 2023
1 parent 5c6b1ab commit 44a4931
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,12 @@ function _e(string $s)
echo __($s, true);
}

function __(string $s, bool $escape = false)
function __(string $s, bool $escape = false, ?string $arg = null)
{
$v = Lang::instance()->get($s);
if (null !== $arg) {
$v = sprintf($v, $arg);
}
return $escape ? htmlspecialchars($v) : $v;
}

Expand Down

0 comments on commit 44a4931

Please sign in to comment.