From 2e29733c8c28ff3280fc8139f3866846cd7deb9c Mon Sep 17 00:00:00 2001 From: maxpozdeev Date: Mon, 11 Sep 2023 09:49:05 +0300 Subject: [PATCH] fix for 1a75eec --- src/init.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/init.php b/src/init.php index 1299ef1..e41813e 100644 --- a/src/init.php +++ b/src/init.php @@ -315,9 +315,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; }