Connect middleware to determine locale for request.