Open
Description
Clear and concise description of the problem
When using getHeaderLocale(event)
or getCookieLocale(event)
they will return the configurable fallback (default: 'en-US'). It would be great if they could (optionally) return undefined, too.
Usecase:
I would like to do a flow like this:
- Try
detectLocaleFromAcceptLanguageHeader(event)
, if none is set: - Try
getCookieLocale(event)
, if none is set: - Use default fallback locale
Suggested solution
They could accept undefined
as a fallback: getHeaderLocale(event, { name: undefined })
Alternative
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guide.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.