The datebox component supports only specific languages and
locales. Sometimes we get a language (en) from the browser
settings, but datebox expects a full locale (en-GB).
This fix tries to find a locale that matches the user's preferred
language. If no supported language/locale is found, we fall
back to "default" which is what datebox expects as fallback.
The datebox component supports only specific languages and locales. Sometimes we get a language (en) from the browser settings, but datebox expects a full locale (en-GB).
This fix tries to find a locale that matches the user's preferred language. If no supported language/locale is found, we fall back to "default" which is what datebox expects as fallback.