aboutsummaryrefslogtreecommitdiffstats
path: root/test/lang.php
blob: 831376083ba59cab07771595afe317b38ca687af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<pre><?php
/**
*/

include_once '../localeDetection.class.php';
include_once '../langs.inc.php';

echo 'Accept-Language: ', $_SERVER['HTTP_ACCEPT_LANGUAGE'], "\n\n";
echo "Relocate `community` with `en` as a default: ", relocate($langs, 'community', 'en', null, false), "\n";

echo "\nTests:\n";
$test_dir = '../sv/';
$lstat = '';

if (file_exists($test_dir)) {
    echo "The file $test_dir exists\n";
    $lstat = lstat($test_dir);
} else {
    echo "The file $test_dir does not exist\n";
}

if (is_dir($test_dir)) {
    echo "The $test_dir is a dir\n";
} else {
    echo "The $test_dir is not a dir.\n";
}

if (is_readable($test_dir)) {
    echo "The file $test_dir is readable\n";
} else {
    echo "The file $test_dir is not readable\n";
}

var_dump($lstat);