33 lines
594 B
PHP
33 lines
594 B
PHP
<?php
|
|
require_once "database.php";
|
|
|
|
$rq_path = "require/";
|
|
|
|
$lg = "fr";
|
|
|
|
if (isset($_GET["lg"])) {
|
|
if (htmlspecialchars($_GET["lg"]) == "en") {
|
|
$lg = "en";
|
|
}
|
|
}
|
|
|
|
else {
|
|
if (isset($_COOKIE["language"])) {
|
|
if (htmlspecialchars($_COOKIE["language"]) == "en") {
|
|
$lg = "en";
|
|
}
|
|
}
|
|
}
|
|
|
|
setcookie(
|
|
"language",
|
|
$lg,
|
|
time() + (365 * 24 * 60 * 60),
|
|
"/",
|
|
"",
|
|
false,
|
|
false
|
|
);
|
|
|
|
require_once __DIR__ . "/locales/" . $lg . ".php";
|
|
?>
|