Split out middleware for locale