0, 'path' => '/', // WICHTIG: hier die Domain, damit API + Frontend teilen 'domain' => $cookieDomain ?: '', 'secure' => $isHttps, 'httponly' => true, // eTLD+1 ist gleich (usbcheck.it), daher reicht Lax für Same-Site 'samesite' => 'Lax', ]); session_start(); } } require_once __DIR__ . '/i18n.php'; // <— zentrale Sprachlogik // ab hier kannst du überall $GLOBALS['lang'] und $GLOBALS['availableLangs'] nutzen // und für JS: $usbConfig = [ // ... dein sonstiges Zeug ... 'i18n' => app_i18n_get_frontend_config(), ]; // ----------------------------------------------------------- // 7) Rest des Systems laden // ----------------------------------------------------------- require_once __DIR__ . "/db.php"; require_once __DIR__ . '/../src/functions.php';