I'm in a rush to release so I am adding features that are needed to make it usable.
This commit is contained in:
parent
c76ab1abf3
commit
4c2857b445
25 changed files with 2475 additions and 3475 deletions
4
includes/.htaccess
Normal file
4
includes/.htaccess
Normal file
|
@ -0,0 +1,4 @@
|
|||
<Files "config.toml">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
</Files>
|
|
@ -11,3 +11,8 @@ if (isset($_GET['lang'])) {
|
|||
}
|
||||
|
||||
$locale = loadLocale($lang);
|
||||
|
||||
function langPrintString($string, $lang)
|
||||
{
|
||||
echo $lang[$string];
|
||||
}
|
|
@ -65,7 +65,12 @@ $current_lang = $_SESSION['lang'] ?? $config['app']['locale'];
|
|||
<select class="form-select" id="languageSelect"
|
||||
onchange="location = this.value;">
|
||||
<?php
|
||||
$currentUrl = strtok($_SERVER["REQUEST_URI"], '?');
|
||||
if (isset($_SERVER["REQUIEST_URI"])) {
|
||||
$currentUrl = strtok($_SERVER["REQUEST_URI"], '?') ?? '/';
|
||||
} else {
|
||||
$currentUrl = '/';
|
||||
}
|
||||
|
||||
$queryParams = $_GET;
|
||||
foreach ($languages as $key => $value) {
|
||||
$queryParams['lang'] = $key;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue