<?php
require_once 'static/multiLanguageConfig.php';
require_once 'static/legacy-locale-entry.php';

$accepted = parseAcceptLanguage($_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? '');
$lang = hpdLegacyEntryLocale($_GET['lang'] ?? null, $accepted);
$filename = hpdLegacyEntryFile(__DIR__, $lang);
// Keep the original server-selected currency and the complete generated UTF-8 document.
$currency = getCurrency();
header('Content-Type: text/html; charset=UTF-8');
header('Vary: Accept-Language');
echo hpdLegacyEntryHtml($filename, $currency);
exit;
