When processing a request, where can you obtain the language setting of
a user’s browser?
I know we can read @request.env[“HTTP_ACCEPT_LANGUAGE”] in an action
easily. But I need to access it before being routed to a controller’s
action… because the accepted language dictates my app’s language
setting programmatically and what action to take. (I’m not allowed to
ask a user to specify a preferred language using an URL.) Where in the
Rails runtime routing is done?
Any filter, plugin, or even somewhere in the Rails core? I spent 4 hours
to poke around, but didn’t get any idea.
Thanks in advance!