feat(i18n): responsive locale-switcher with SVG flags (closes #75)

This commit is contained in:
Hermes
2026-06-04 09:44:40 +00:00
parent 4b1c779846
commit 0186de90ec
4 changed files with 322 additions and 19 deletions

View File

@@ -48,14 +48,6 @@ final class I18n
}
$text ??= $key;
return self::interpolate($text, $params);
if ($params !== []) {
$search = array_map(static fn (string $k): string => '{' . $k . '}', array_keys($params));
$replace = array_values($params);
$text = str_replace($search, $replace, $text);
}
return $text;
}
/**