Open cachius opened 2 years ago
Safari on MacOS sends an all-lowercase header like Accept-Language: de-de. On case-sensitive filesystems this causes MomentLocale.php::fetchSimilarLocales not finding alternatives.
Accept-Language: de-de
$dir = dirname($path); $lang = basename($path); $locales = glob("$dir".DIRECTORY_SEPARATOR.substr($lang,0,2) . '*.php');
works around that. It would be even better to be also case-insensitive to the first part of the locale. C.f. Can PHP's glob() be made to find files in a case insensitive manner?
Safari on MacOS sends an all-lowercase header like
Accept-Language: de-de
. On case-sensitive filesystems this causes MomentLocale.php::fetchSimilarLocales not finding alternatives.works around that. It would be even better to be also case-insensitive to the first part of the locale. C.f. Can PHP's glob() be made to find files in a case insensitive manner?