Bläddra i källkod

Delete 'test_language.php'

Samuli Valavuo 6 dagar sedan
förälder
incheckning
4bda7ec354
1 ändrade filer med 0 tillägg och 39 borttagningar
  1. 0 39
      test_language.php

+ 0 - 39
test_language.php

@@ -1,39 +0,0 @@
-<?php
-// Start session
-session_start();
-
-require_once 'includes/config.php';
-require_once 'includes/translation.php';
-
-// Simulate different scenarios
-echo "=== Testing Language Switching ===\n\n";
-
-// Test 1: Default language (no session, no GET param)
-$_SESSION = array(); // Clear session
-$_GET = array(); // Clear GET params
-
-$translation = Translation::getInstance();
-echo "Test 1 - Default: " . $translation->getCurrentLanguage() . "\n";
-echo "Session language: " . ($_SESSION['language'] ?? 'not set') . "\n\n";
-
-// Test 2: Language parameter in URL
-$_GET['lang'] = 'fi';
-$translation = Translation::getInstance(); // Fresh instance
-echo "Test 2 - With GET lang=fi: " . $translation->getCurrentLanguage() . "\n";
-echo "Session language: " . ($_SESSION['language'] ?? 'not set') . "\n\n";
-
-// Test 3: Session persistence
-$_GET = array(); // Clear GET params
-$translation = Translation::getInstance(); // Fresh instance
-echo "Test 3 - Session persistence: " . $translation->getCurrentLanguage() . "\n";
-echo "Session language: " . ($_SESSION['language'] ?? 'not set') . "\n\n";
-
-// Test 4: Test translation
-echo "Test 4 - Translation test:\n";
-echo "English 'nav_home': " . $translation->translate('nav_home') . "\n";
-echo "Finnish 'nav_home': " . $translation->translate('nav_home') . "\n\n";
-
-// Test 5: Language switcher
-echo "Test 5 - Language switcher HTML:\n";
-echo $translation->getLanguageSwitcher('test.php') . "\n";
-?>