dj_mix_hosting_software/functions/i18n.php
Cody Cook 9e7a10bf6e
All checks were successful
SonarQube Scan / SonarQube Trigger (push) Successful in 25s
Sonar fixes.
2024-05-06 23:08:07 -07:00

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';
}
}