'English', 'fr' => 'Français', 'ru' => 'Russian', 'pt_BR' => 'Português do Brasil', 'nl' => 'Nederlands', 'es' => 'Spanish', 'tr' => 'Türkçe', 'uk' => 'Українська', 'zh' => '简体中文', 'ja' => '日本語', ]; function common_header(string $description): void { global $MYSITE; $meta_image_path = \htmlspecialchars( \filter_var($MYSITE . 'images/php8/php_8_4_released.png', \FILTER_VALIDATE_URL)); $meta_description = \htmlspecialchars($description); \site_header("PHP 8.4 Release Announcement", [ 'current' => 'php8', 'css' => ['php8.css'], 'meta_tags' => << META ]); } function language_chooser(string $currentLang): void { // Print out the form with all the options echo '
'; } function message($code, $language = 'en') { $original = require __DIR__ . '/languages/en.php'; if (($language !== 'en') && file_exists(__DIR__ . '/languages/' . $language . '.php')) { $translation = require __DIR__ . '/languages/' . $language . '.php'; } return $translation[$code] ?? $original[$code] ?? $code; }