mirror of
https://github.com/ellite/Wallos.git
synced 2026-04-20 06:58:17 -04:00
refactor: run linter and cleanup php files fix: not every payment cycle was shown on the calendar feat: also show previous payments on the calendar for the current month
26 lines
561 B
PHP
26 lines
561 B
PHP
<?php
|
|
|
|
$lang = "en";
|
|
if (isset($_COOKIE['language'])) {
|
|
$selectedLanguage = $_COOKIE['language'];
|
|
|
|
if (array_key_exists($selectedLanguage, $languages)) {
|
|
$lang = $selectedLanguage;
|
|
}
|
|
}
|
|
|
|
function translate($text, $translations)
|
|
{
|
|
if (array_key_exists($text, $translations)) {
|
|
return $translations[$text];
|
|
} else {
|
|
require 'en.php';
|
|
if (array_key_exists($text, $i18n)) {
|
|
return $i18n[$text];
|
|
} else {
|
|
return "[i18n String Missing]";
|
|
}
|
|
}
|
|
}
|
|
|
|
?>
|