Skip to content

Include default global middleware for interacting with "Accept-Language" HTTP header #52914

Answered by mbabker
SimonARG asked this question in Ideas
Discussion options

You must be logged in to vote

Luckily, the Symfony request already has a getLanguages() method to read that header, and a getPreferredLanguage() method to find the preferred language. So you really only need to use the existing API that Laravel inherits to configure your application.

Replies: 3 comments 9 replies

Comment options

You must be logged in to vote
1 reply
@shaedrich
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by SimonARG
Comment options

You must be logged in to vote
8 replies
@marius-mcp
Comment options

@marius-mcp
Comment options

@mbabker
Comment options

@shaedrich
Comment options

@marius-mcp
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
5 participants