allow access to the request method

I wanted to preview my templates with a different locale.
To make this process easier I wanted to change the locale based on the locale param.