|
|
@@ -1,34 +0,0 @@
|
|
|
-<?php
|
|
|
-// Debug the redirect issue
|
|
|
-session_start();
|
|
|
-
|
|
|
-echo "=== Debug Redirect Issue ===\n\n";
|
|
|
-
|
|
|
-require_once 'includes/config.php';
|
|
|
-
|
|
|
-// Simulate the exact scenario
|
|
|
-$_GET['lang'] = 'fi';
|
|
|
-$_SERVER['REQUEST_URI'] = '/index.php?lang=fi';
|
|
|
-
|
|
|
-echo "Before Translation initialization:\n";
|
|
|
-echo "GET lang: " . $_GET['lang'] . "\n";
|
|
|
-echo "REQUEST_URI: " . $_SERVER['REQUEST_URI'] . "\n";
|
|
|
-echo "Session language: " . ($_SESSION['language'] ?? 'not set') . "\n\n";
|
|
|
-
|
|
|
-// This should trigger the redirect, but let's see what happens
|
|
|
-try {
|
|
|
- require_once 'includes/translation.php';
|
|
|
-
|
|
|
- echo "After Translation initialization:\n";
|
|
|
- echo "Session language: " . ($_SESSION['language'] ?? 'not set') . "\n";
|
|
|
-
|
|
|
- $translation = Translation::getInstance();
|
|
|
- echo "Current language: " . $translation->getCurrentLanguage() . "\n";
|
|
|
- echo "Translation test: " . $translation->translate('nav_home') . "\n";
|
|
|
-
|
|
|
-} catch (Exception $e) {
|
|
|
- echo "Exception: " . $e->getMessage() . "\n";
|
|
|
-}
|
|
|
-
|
|
|
-echo "\n=== Debug Complete ===\n";
|
|
|
-?>
|