Add locale, en_US, DJ and Database functions.

This commit is contained in:
Cody Cook 2024-04-29 21:16:49 -07:00
commit 5fe1a21b8e
7 changed files with 440 additions and 8 deletions

View file

@ -1,14 +1,29 @@
<?php
// read toml config file
require_once 'vendor/autoload.php';
require_once 'functions/i18n.php';
require 'vendor/autoload.php';
require 'functions/i18n.php';
use Yosymfony\Toml\Toml;
$config = Toml::ParseFile('includes/config.toml');
// $config['app']['name']
$lang = $_SESSION['lang'] ?? $config['app']['locale'];
$locale = loadLocale($lang);
// load locale
$locale = loadLocale($config['app']['locale']);
// $locale['string']
?>
<!doctype html >
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php echo $config['app']['name']; ?></title>
<link href="css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<?php require 'navbar.php'; ?>
<script src="js/bootstrap.bundle.min.js"></script>
</body>
</html>