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