Middleware for language choice