Cody Cook
9e7a10bf6e
All checks were successful
SonarQube Scan / SonarQube Trigger (push) Successful in 25s
14 lines
359 B
PHP
14 lines
359 B
PHP
<?php
|
|
|
|
function loadLocale($lang = 'en-us') {
|
|
$file = __DIR__ . '/../locale/' . $lang . '/messages.php';
|
|
if (file_exists($file)) {
|
|
return require_once $file;
|
|
} else {
|
|
// Fallback to English if the specified language file does not exist
|
|
return require_once __DIR__ . '/../locale/en-us/messages.php';
|
|
}
|
|
|
|
|
|
}
|