#3558 -- Expand support for browser-determined locale.

This commit is contained in:
Buster "Silver Eagle" Neece 2020-12-13 07:59:44 -06:00
parent b19ac79e8c
commit c146166eb5
No known key found for this signature in database
GPG Key ID: 6D9E12FF03411F4E
1 changed files with 4 additions and 0 deletions

View File

@ -96,6 +96,10 @@ class Customization
$browser_locale = Locale::acceptFromHttp($server_params['HTTP_ACCEPT_LANGUAGE'] ?? null);
if (!empty($browser_locale)) {
if (2 === strlen($browser_locale)) {
$browser_locale = strtolower($browser_locale) . '_' . strtoupper($browser_locale);
}
$try_locales[] = substr($browser_locale, 0, 5) . '.UTF-8';
}
}