mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-09 21:01:00 +00:00
Centralize language loading with English fallback (#361)
This commit is contained in:
@@ -60,12 +60,8 @@ include_once("Form.php");
|
||||
include_once("Generator.php");
|
||||
include_once("Multisort.php");
|
||||
include_once("Ranking.php");
|
||||
include_once("Lang/" . LANG . ".php");
|
||||
// en.php is an idempotent fallback (tz_def only defines missing keys); loading
|
||||
// it after the player language guarantees every interface constant is defined,
|
||||
// so a key missing from a translation degrades to English instead of a PHP 8.3
|
||||
// "undefined constant" fatal (blank page). See issue #189.
|
||||
include_once("Lang/en.php");
|
||||
require_once __DIR__ . "/Lang/loader.php";
|
||||
tz_load_language(LANG);
|
||||
include_once("Logging.php");
|
||||
include_once("Message.php");
|
||||
include_once("Alliance.php");
|
||||
@@ -585,4 +581,4 @@ if (!empty($_SESSION['id_user'])) {
|
||||
$message = new Message;
|
||||
$user = new User((int)$_SESSION['id_user'], $database);
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user