You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.
We currently use the 'accepts' npm library to get an ordered list of user-preferred languages from a request.
The 'fluent-langneg' library just added an API in 0.0.3 to parse an accept-language header, a function called acceptedLanguages.
We should switch to dogfooding the new 'fluent-langneg' API.
I'm not sure the output will be the same in all cases, particularly the case of "Accept-Language: *", so we'll need to test that. Manual testing is fine; headers can be tweaked from FF devtools. Unit tests would be swell. Also note that an express request object is passed into accepts, while just the header should be passed into acceptedLanguages.
The text was updated successfully, but these errors were encountered:
We currently use the 'accepts' npm library to get an ordered list of user-preferred languages from a request.
The 'fluent-langneg' library just added an API in 0.0.3 to parse an accept-language header, a function called
acceptedLanguages
.We should switch to dogfooding the new 'fluent-langneg' API.
I'm not sure the output will be the same in all cases, particularly the case of "Accept-Language: *", so we'll need to test that. Manual testing is fine; headers can be tweaked from FF devtools. Unit tests would be swell. Also note that an express request object is passed into
accepts
, while just the header should be passed intoacceptedLanguages
.The text was updated successfully, but these errors were encountered: