From f373ead95fb5beb962c376b5b7b46dfde8ac4e57 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Mon, 23 Feb 2026 22:57:27 -0500 Subject: update website to work with crimson framework --- src/web/helpers/lang.php | 90 ------------------------------------------------ 1 file changed, 90 deletions(-) delete mode 100644 src/web/helpers/lang.php (limited to 'src/web/helpers/lang.php') diff --git a/src/web/helpers/lang.php b/src/web/helpers/lang.php deleted file mode 100644 index 72167fc..0000000 --- a/src/web/helpers/lang.php +++ /dev/null @@ -1,90 +0,0 @@ - $sub - */ -function lang( - string $key, - ?string $default = NULL, - ?array $sub = NULL) { - $lang = $GLOBALS['__lang']; - if(array_key_exists($key, $lang)) { - if ($sub) { - return sprintf($lang[$key], ...$sub); - } else { - return $lang[$key]; - } - } else if ($default !== NULL) { - return $default; - } else { - trigger_error('Undefined lang string: ' . $key, E_USER_WARNING); - return $key; - } -} - -/** - * @param array $attrs - * @param ?array $sub - */ -function ilang( - string $key, - ?string $class = NULL, - ?string $id = NULL, - ?string $href = NULL, - ?string $click = NULL, - array $attrs = array(), - ?array $sub = NULL, - bool $button = FALSE, - string $container = 'span' -) { - $text = ucfirst(lang($key . "_text", FALSE, sub: $sub)); - $tip = lang($key . "_tip", FALSE, sub: $sub); - $icon = lang($key . "_icon", FALSE); - $content = lang($key . "_content", FALSE); - - if ($click || $button) { - echo ''; - } else { - echo ''; - } -} -- cgit v1.2.3-freya