This commit is contained in:
2025-11-26 23:13:47 +01:00
parent 0cf33d302a
commit cd8dc3af79
3 changed files with 25 additions and 33 deletions

25
public/debug/lang.php Normal file
View File

@@ -0,0 +1,25 @@
<?php
// public/debug/lang.php
// 1) Rohheader anzeigen
header('Content-Type: text/plain; charset=utf-8');
echo "=== HTTP_ACCEPT_LANGUAGE ===\n";
echo ($_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? "(nicht gesetzt)") . "\n\n";
// 2) fileload.php einbinden (macht Session + i18n + functions.php)
require_once __DIR__ . '/../config/fileload.php';
echo "=== Ergebnis aus fileload.php ===\n";
echo "Gewähltes \$lang: " . ($GLOBALS['lang'] ?? '(kein lang)') . "\n\n";
echo "=== Verfügbare Sprachen (\$availableLangs) ===\n";
print_r($GLOBALS['availableLangs'] ?? []);
echo "\n=== Aktive Sprachdatei (i18n.current.meta) ===\n";
$current = $GLOBALS['i18n']['current'] ?? [];
if (isset($current['meta'])) {
print_r($current['meta']);
} else {
echo "(kein meta in current)\n";
}

View File

@@ -1,33 +0,0 @@
<?php
$pageKey = 'landing';
//include_once dirname(__DIR__) . "/../config/fileload.php";
// Sprachlogik:
$lang = $_GET['lang'] ?? 'en';
$lang = in_array($lang, ['de','en','it','fr']) ? $lang : 'en';
// User-Dummy (später über Login ersetzen)
$userInitials = null;
// Seitentitel & Description für das Layout
$pageTitle = app_primary_domain() . ' Test USB-Sticks';
$pageDescription = 'Prüfe deine USB-Sticks auf Geschwindigkeit, Integrität und mögliche Fakes direkt im Browser.';
$navAnchors = [
[ 'href' => '#how', 'key' => 'nav_how' ],
[ 'href' => '#problem', 'key' => 'nav_problem' ],
[ 'href' => '#features', 'key' => 'nav_features' ],
[ 'href' => '#security', 'key' => 'nav_security' ],
[ 'href' => '#faq', 'key' => 'nav_faq' ],
];
tpl('layout_start'); // structure/header.php
tpl('hero', 'landing', 'main');
tpl('how', 'landing', 'main');
tpl('problem', 'landing', 'main');
tpl('features', 'landing', 'main');
tpl('security', 'landing', 'main');
tpl('faq', 'landing', 'main');
tpl('layout_end'); // structure/footer.phpW