Change language behavior; change _ to - and lowercase langs.

This commit is contained in:
Cody Cook 2024-05-03 09:46:34 -07:00
commit dc7f0025ef
32 changed files with 2 additions and 2 deletions

View file

@ -1,12 +1,12 @@
<?php
function loadLocale($lang = 'en_US') {
function loadLocale($lang = 'en-us') {
$file = __DIR__ . '/../locale/' . $lang . '/messages.php';
if (file_exists($file)) {
return require $file;
} else {
// Fallback to English if the specified language file does not exist
return require __DIR__ . '/../locale/en_US/messages.php';
return require __DIR__ . '/../locale/en-us/messages.php';
}