forked from TUM-Dev/RBGreaterAgain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
language.php
41 lines (34 loc) · 1.11 KB
/
language.php
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
35
36
37
38
39
40
41
<?php
session_start();
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
$acceptLang = ['de', 'en'];
$lang = in_array($lang, $acceptLang) ? $lang : 'en';
if (isset($_SESSION["lang"])) {
$lang = $_SESSION["lang"];
}
if (isset($_GET["lang"])) {
$lang = $_GET["lang"];
}
$_SESSION["lang"] = $lang;
$DICT = [];
if ($lang == "de") {
$DICT = [
"holder" => "Inhaber von",
"impressum" => "Impressum",
"legal" => "Datenschutz",
"current_livestreams" => "Aktuelle Livestreams",
"vod" => "Video-Aufzeichungen",
"vod_archive" => "Video-Aufzeichungen Archiv",
"stream_not_found" => "Stream nicht gefunden",
];
} else {
$DICT = [
"holder" => "Holder of",
"impressum" => "Impressum",
"legal" => "Legal",
"current_livestreams" => "Current Livestreams",
"vod" => "Video-On-Demand",
"vod_archive" => "Video-On-Demand Archive",
"stream_not_found" => "Stream not found",
];
}