1
0
Fork 0
mirror of synced 2024-10-01 17:58:02 +13:00

format fix

This commit is contained in:
Damodar Lohani 2023-04-18 07:14:03 +00:00
parent 862312239b
commit 118ddb9101

View file

@ -666,12 +666,12 @@ $locales = Config::getParam('locale-codes', []);
foreach ($locales as $locale) {
$code = $locale['code'];
$path = __DIR__ . '/config/locale/translations/' . $code . '.json';
if (!\file_exists($path)) {
$path = __DIR__ . '/config/locale/translations/' . \substr($code, 0, 2) . '.json'; // if `ar-ae` doesn't exist, look for `ar`
if(!\file_exists($path)) {
if (!\file_exists($path)) {
$path = __DIR__ . '/config/locale/translations/en.json'; // if none translation exists, use default from `en.json`
}
}